Rails: savage_beast forum plugin and tinymce - new post works but edit doesn't use tinymce properly

Posted by Max Williams on Stack Overflow See other posts from Stack Overflow or by Max Williams
Published on 2010-06-15T15:51:59Z Indexed on 2010/06/15 15:52 UTC
Read the original article Hit count: 948

Filed under:
|

Hi all. I'm using the savage_beast forum plugin and tinymce (via the tinymce_hammer plugin) in my rails app. When posting a new post, tinymce works fine. However, when i go to edit a post i get the tinymce editor, but the content in the edit box has all been converted into html.

Can anyone tell me how i get it so that what appears in the tinymce edit box is the original text i posted, rather than the converted-to-html version? Does it need to get converted back from html into a format tinymce will use?

Savage_beast saves the original given text in a body field, and the converted-to-html text in a body_html field. After tinymce does its work in the first instance (ie when posting a new post) the body field gets text that's already been converted to html. So i guess i need to convert it back to whatever tinymce expects? I'd expect tinymce to be happy with getting html, and to just handle it, though.

grateful for any advice - max

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about tinymce