TINYMCE设置焦点...只是不会工作 [英] TINYMCE set focus... just will not work

查看:344
本文介绍了TINYMCE设置焦点...只是不会工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试过了

  tinyMCE.execInstanceCommand(content,mceFocus); 

我已经尝试了

  tinyMCE.execCommand('mceFocus',false,content); 

他们似乎都不起作用: - (


解决方案

好的,我陷入了同样的问题,但是我相信这取决于你在哪里执行代码,下面是我发现的各种链接:



http://tinymce.moxiecode。 com / forum / viewtopic.php?id = 8238



http://tinymce.moxiecode.com/forum/viewtopic.php?pid=91307#p91307





但是我解决了我的问题,它可能不适用于你:

this.focus();



this.tinymce.execCommand('mceFocus',false,'yourTinyMCEtextAreaID_goes_here'); InsertHorizo​​ntalRule里面,所以你可以有一个想法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设置焦点...只是不会工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆