我有这个问题:在我的网站中有带有tinymce的textarea,我可以看到所有textarea,但是当我在textarea中打开colorbox时,这不会继承tinymce属性。这是我打开颜色框的代码:
$("#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?谢谢