开发者

tinymce - how to set the focus to the first editor on a page with multiple editors?

if I have more than one tinymce editor on a page, every action I do goes to the last editor unless I explicitly click on the ed开发者_如何学Citor I want to edit. For example, I made a plugin, which displays a dialog box, I type something in the dialog box and it should go to the first editor (I launch the dialog box from the first editor) but it goes to the last one, as it is the currently active editor.

How do I make the first editor active, once the page is loaded?


try this

tinyMCE.execInstanceCommand("mce_editor_0", "mceFocus");

taken from here


If you have multiple tinyMCE forms on one page, I recommend
Command: runScript
Target: tinyMCE.get('textarea_id').setContent('Your Text')

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜