tinymce not working with chrome when i dynamically setcontent

Posted by oo on Stack Overflow See other posts from Stack Overflow or by oo
Published on 2009-08-23T10:59:09Z Indexed on 2010/03/23 6:23 UTC
Read the original article Hit count: 614

I have a site that i put:

<body  onload="ajaxLoad()" >

I have a javascript function that then shove data from my db into the text editor by using the setContent method in javascript of the textarea. seems fine in firefox and IE but in chrome sometimes nothing shows up. no error, just blank editor

in the body section:

  <textarea id="elm1" name="elm1" rows="40" cols="60" style="width: 100%"> 
</textarea>

in the head section:

function ajaxLoad() {
        var ed = tinyMCE.get('elm1');
        ed.setProgressState(1); // Show progress
        window.setTimeout(function() {
            ed.setProgressState(0); // Hide progress
            ed.setContent('<p style="text-align: center;"><strong><br /><span   style="font-size: small;">General Manager&#39;s Corner</span></strong></p><p style="text-align: center;">August&nbsp;2009</p><p>It&rsquo;s been  15<sup>th</sup> and so have a Steak Night (Saturday, 15<sup>th</sup>) and a shore Dinner planned (Saturday, 22<sup>nd</sup>) this month. urday, September 5<sup>th</sup>. e a can&rsquo;t missed evening, shas extended it one additional week. The last clinic will be the week of August 11<sup>th</sup>. </p><p>&nbsp;Alt (Tuesday through Thursday) </p><p>&nbsp;I wouClub.</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;<strong></strong></p>');
        }, 1);
    }

i am not sure if its some of the formatting that chrome is reject but it seems like if tinymce can parse it in one browser it can do it in any browser so i am confused.

any suggestions?

© Stack Overflow or respective owner

Related posts about tinymce

Related posts about chrome