# Problem with tiny\_mce

**URL:** <https://www.ruby-forum.com/t/problem-with-tiny-mce/157935>\
**Category:** Rails\
**Created:** [January 16, 2009, 6:08pm UTC](https://www.ruby-forum.com/t/problem-with-tiny-mce/157935 "2009-01-16T18:08:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elioncho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ed8c4c/32.png) [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Post date:** [January 16, 2009, 6:08pm UTC](https://www.ruby-forum.com/t/problem-with-tiny-mce/157935/1 "2009-01-16T18:08:37Z")

</div>

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):

.

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,

---

<div class="post-metadata">

**Author:** ![elioncho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ed8c4c/32.png) [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Post date:** [January 16, 2009, 9:13pm UTC](https://www.ruby-forum.com/t/problem-with-tiny-mce/157935/2 "2009-01-16T21:13:12Z")

</div>

I solved the issue:

This was the the old script:

tinyMCE.get(‘editor1’).setContent(‘

# This is Ronen Site 1
’);

.

I changed it to:

.

Hope it helps someone in the future,

Elioncho
