How to save text

hi
i’m working on a poem site. everything is ok but i dono how to save
the poem with the style which is applied in the text area. so
anybody have any idea.
sorry for my english.

thanks in advance

nirosh wrote:

hi
i’m working on a poem site. everything is ok but i dono how to save
the poem with the style which is applied in the text area. so
anybody have any idea.
sorry for my english.

thanks in advance

Data type of the column in which you are saving the poem should be
‘TEXT’.

thank you for the reply. already the data type is text.but that won’t
work for me

nirosh

thanks for the reply. i setup the column as text. but that won’t
effect.

nirosh

On 28 Apr, 08:49, nirosh [email protected] wrote:

thank you for the reply. already the data type is text.but that won’t
work for me
if what you want is to save the style of the text (like bold, italic,
font size, etc.) you either need to use some html directly (quite ugly
for your users) or an “improved” text area field. i used
http://tinymce.moxiecode.com/ and it’s good, but there are many others.

thank you eugenio.what i mean is not the font style.i need to keep the
poem structure and i want the Google Indic support which is used for
Asian language pack.
finally i want to keep the poem structure only. all the other features
has been implemented.

thank you
nirosh

Thanks buddy. its working great. thank you very much.

nirosh

Maybe try something like RedCloth or TinyMCE

I haven’t personally used either, but they look like something that
might help you.

Are you refering to the line breaks?
In the output you must replace \n with the
tag, as HTML does
not interpret new line characters.
For instance <%= @poem.body.gsub("\n","
") %>

For starters you can look at the simple_format text helper in Rails.
You can do <%= simple_format(h(@poem.body)) %>

Franz