开发者

How do I refresh TinyMCE for the code that I add with JavaScript

开发者 https://www.devze.com 2022-12-28 02:47 出处:网络
I need to insertcode for flash to TinyMCE with JavaScript. If I insert the same code using HTML menu of TinyMCE, it automatically add flash icon to the editor. But if I insert the code using JavaScrip

I need to insert code for flash to TinyMCE with JavaScript. If I insert the same code using HTML menu of TinyMCE, it automatically add flash icon to the editor. But if I insert the code using JavaScript, the a开发者_高级运维ctual code is inserted but it shows nothing on the screen.

One trick I found is toggle TinyMCE to normal textarea and back to TinyMCE. Then, it shows the flash icon. Is there a better way to do that?

Thanks.

Sam


Try this code...

var content=tinyMCE.get('comment').getContent()+"ur flash content";
tinyMCE.get('comment').setContent(content);

Since i dont know about flash. but using this way u can insert into tinymce


Have u tried using:mceRepaint ?

http://wiki.moxiecode.com/index.php/TinyMCE:Commands

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号