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

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

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

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

nirosh

Maybe try something like RedCloth or TinyMCE
http://tinymce.moxiecode.com/

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

Maybe try something like RedCloth or TinyMCE
http://tinymce.moxiecode.com/

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

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

Franz