javascript - tinyMce setcontent problem in IE -
the problem tinymce library on wordpress , when run internet explorer( 7 or 8).
when add content (like "<h1> hey </h1>
"), adds content in firefox/chrome @ right place, in ie, adds start of page (above everything).
here code use
var txt = "<h1> hey </h1>"
;
var ed = tinymce.getinstancebyid(domelementid); // domelementid div id textarea adding content. ed.selection.setcontent(txt);
can suggest reason/fix ? thanks.
had same problem using tinymce on internet explorer 8, here solution have found:
var ed = tinymce.getinstancebyid(domelementid); *ed.focus();* ed.selection.setcontent(txt);
the missing part 1 focusing.
Comments
Post a Comment