我有这个问题:在我的网站有tinymce textareas和我可以看到所有textarea的权利,但是当我打开textarea内的colorbox,这不会继承tinymce属性。 这是我的代码以打开颜色框:加载tinybox到colorbox
$("#edit_item"+val.iditem).colorbox({
href: $(this).attr('href'),
data: data,
onComplete: function(){ setup_tiny(); }
});
,这是我的职责 'setup_tiny':
function setup_tiny(){
tinyMCE.init({
mode : "exact",
elements : "description",
width : "40%",
height: "200",
// General options
theme: "advanced",
// Theme options
theme_advanced_buttons1: "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull",
theme_advanced_buttons2: "bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",
theme_advanced_buttons3: "hr,removeformat,separator,sub,sup,separator",
theme_advanced_buttons4: "",
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
theme_advanced_resizing: true
});
}
我刚才试过这种方式,负荷颜色框后:
tinyMCE.execCommand('mceFocus', false, 'the_textareas_id_here');
tinyMCE.execCommand('mceRemoveControl', false, 'the_textareas_id_here');
但它不起作用。 我也尝试从这个网站'http://mktgdept.com/jquery-tinymce-plugin'导入tinymce插件,也是不行的。
如何在彩盒内加载tinymce? 谢谢
你能描述一下colorbox的功能吗?你能提供一个像锡琴小提琴一样的现场实例吗? – Thariama
[Here](http://www.tinymce.com/tryit/full.php)你能找到一个tinymce的例子。在我的网站中,只有当我在colorbox中的textarea上加载这个插件时才起作用。 – PapaSmurf
不,我没有想要一个随机的Tinymce编辑器的例子,我想要一个你的用例的实例。我建议你在tinymce小提琴上创建一个小提琴(http://fiddle.tinymce.com/)。使用这个我能够发挥代码和找到解决方案 – Thariama