问题描述
我试过了
tinyMCE.execInstanceCommand(content,mceFocus);
我已经尝试了
tinyMCE.execCommand('mceFocus',false,content);
他们似乎都不起作用: - (
)好的,我陷入了同样的问题,但是我相信这取决于你在哪里执行代码,下面是我发现的各种链接:
但是我解决了我的问题,它可能不适用于你:
this.focus();
this.tinymce.execCommand('mceFocus',false,'yourTinyMCEtextAreaID_goes_here'); $ c $这个代码被应用在tiny_mce_src.js - > InsertHorizontalRule里面,所以你可以有一个想法o
希望有帮助。
I've tried
tinyMCE.execInstanceCommand("content", "mceFocus");
I've tried
tinyMCE.execCommand('mceFocus', false, "content");
None of them seem to work :-(
Well, I was stuck in the same problem. But I believe it depends where you execute the code. Here are various links that I've found so far:
http://tinymce.moxiecode.com/forum/viewtopic.php?id=8238
http://tinymce.moxiecode.com/forum/viewtopic.php?pid=91307#p91307
But I solved my issue the following, and it might not apply to yours:
this.focus();
this.tinymce.execCommand('mceFocus', false, 'yourTinyMCEtextAreaID_goes_here');
This code was applied inside the tiny_mce_src.js -> InsertHorizontalRule, just so you can have an idea of the scope.
Hope that helps.
这篇关于TINYMCE设置焦点...只是不会工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!