最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin2浏览0评论

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-ONLY solutions that didn't require some TinyMCE plugin... I'm sure I'm not looking in the right places, but has anyone here ever e across this issue?

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-ONLY solutions that didn't require some TinyMCE plugin... I'm sure I'm not looking in the right places, but has anyone here ever e across this issue?

Share Improve this question asked Nov 12, 2010 at 20:01 Weston WatsonWeston Watson 5,7446 gold badges25 silver badges25 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 6

You can also do

tinyMCE.get('tinymce_id').setContent(my_new_content);
tinyMCE.execCommand('mceReplaceContent',false,TextToAdd); 
发布评论

评论列表(0)

  1. 暂无评论