1

I added tinymce to my active-admin so I could format large text areas. It works great, I can add effects and save that model. But when I go to browser it just shows html code like this :

<p>Aizaugu&scaron;u &nbsp;lauksaimniecības zemju apstrāde ar Ahvi zemes frēzi.</p> <p><span style="color: #333333; font-family: 'Segoe UI', Arial, Verdana, Tahoma, sans-serif; font-size: 13px;"><strong>In Microsoft Office OneNote 2007</strong>, you try to send a note to a mail recipient as an attachment. After you do this, the following text is unexpectedly inserted in the body of a new e-mail message:</span></p> <div class="message" style="margin: 0px; padding: 10px 30px; color: #333333; font-family: 'Segoe UI', Arial, Verdana, Tahoma, sans-serif; font-size: 13px;"><strong>Click the OneNote</strong> attachment if you want to view or edit the notes in OneNote. If you don't have OneNote 2007, you can click the second attachment to view the notes as a Web page.<br /><br />You can download a free OneNote trial version from: `http://r.office.microsoft.com/r/rlidOneNoteTrial?clid=1033&ver=12&app=onenote.exe&p1=12

Instead off text with specified effects. That is because some Javascript error?

Thanks :)

Edgars
  • 913
  • 1
  • 19
  • 53

1 Answers1

1

This is probably due to the content being escaped before it is rendered in your view. Rails does this automatically as a safety precaution. In your view you probably have something like this:

<%= @model.content %>

Try turning off the escaping by doing:

<%= @model.content.html_safe %>

Hope that helps!

Stratus3D
  • 4,648
  • 4
  • 35
  • 67