Is it possible to write Ruby code inside the TinyMCE textbox? I've tried accessing some model data by putting <%= foo.bar %> inside a TinyMCE textbox but when rendering the raw text it displays the Ruby code as is - it doesn't render the Ruby code, just treats it as part of the text.
I've tried the raw
and html_safe
methods but neither worked.
Any suggestions?
Edit: I'm using the tinymce-rails
gem and the following is the code in my form:
<td><%= section_form.text_area :html, class: "tinymce", style: "width:800px; height:300px;" %></td>
<%= tinymce content_css: asset_path('tiny_mce_content.css') %>