开发者

Javascript and TinyMCE (can't change .value or textarea with TinyMCE)

开发者 https://www.devze.com 2023-01-24 15:47 出处:网络
In a perfect world (with out TinyMCE) the following code works great:document.myform.textarea.value += \'[MY_BB_CODE]\';

In a perfect world (with out TinyMCE) the following code works great:document.myform.textarea.value += '[MY_BB_CODE]';

With TinyMCE enabled on this page, I can't use the standard javascript. I googled around and haven't found any JAVASCRIPT-ON开发者_如何学PythonLY solutions that didn't require some TinyMCE plugin... I'm sure I'm not looking in the right places, but has anyone here ever come across this issue?


You can also do

tinyMCE.get('tinymce_id').setContent(my_new_content);


tinyMCE.execCommand('mceReplaceContent',false,TextToAdd); 
0

精彩评论

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

关注公众号