I have a problem with the tiny_mce, i have this javascript in my view (that javacript works fine because when i didn't had tiny_mce it worked fine):
. <script> . function change(value) . { . . <% for layout in @layouts %> . . if (value == "<%= layout.temp_id %>") . { . document.getElementById ("text_area_html_content").innerHTML = '<%= layout.body %>'; . } . . <% end %> . . } . </script>
And also I have this in the HTML
. <%= collection_select(:temp,:temp, @templates, :id, :name , {:class => 'selecttag'}, :onchange => "change(value);") %> . . <%= f.text_area :body, {:id => "text_area_html_content",:class => 'mceEditor'} %>
So...
The 'onchange' event of the select tag changes the innerHTML of the textarea using the javascript above. When I had the text without the tiny_mce it worked fine, but now with the tiny_mce the innerHTML it doesn't works.
Can anyone help me, any ideas?
Thanks,