TinyMCE-在fancyboxm中第二次加载时未定义的'e','j','t' [英] TinyMCE - undefined 'e','j','t' when loading for a second time in fancyboxm
问题描述
早晨.
我目前正在尝试向我的应用程序添加快速编辑功能.我只是简单地使用fancybox传递了数据,将适当的数据加载到tinymce中.
I am currently trying to add a quick edit feature to my application. I have simply data passed using fancybox wich loads the appropriate data into tinymce.
问题是,一旦我第一次关闭fancybox并移至第二个项目上进行编辑和单击,所有内容就会载入正常的外观(包括tinyMCE),但我无法在所见即所得的编辑器中进行编辑,并且萤火虫显示未定义的"e'或't'或'd'决定显示的任何一个...
The problem being once i have closed the fancybox down for the first time and move onto the second item to edit and click, everything loads up ok visualy (including tinyMCE) but i cannot edit within the wysiwyg editor with firebug displaying undefined 'e' or 't' or 'd' whichever one it decides to show...
任何帮助将不胜感激.
编辑
try{
function remove_mce(){
tinyMCE.execCommand('mceRemoveControl',false,'elm1');
}
$('#tree a').bind('click', function(){
$('#tree ul li ul').removeClass('showBranch');
var ob = $(this);
var ob_parent = ob.parent('li');
ob_parent.removeClass('branch').addClass('branch-open');
ob.parents('ul').addClass('showBranch');
$('~ li', ob_parent).children(':first').addClass('showBranch');
return false;
});
$("#tree .product a").fancybox({
'autoDimensions': false,
'width' : '750',
'height' : '90%',
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'speedIn' : 600,
'speedOut' : 200,
'overlayShow' : true,
'hideOnOverlayClick' : false,
'onCleanup' : remove_mce()
});
}catch(err){alert(err.message);}
推荐答案
TinyMCE如果通过其他方式移除其控件然后重新打开,则可能会出现问题,就像fancybox一样.
TinyMCE will have problems if its controls are removed by something else then reopened, as it seems that fancybox is doing.
如果可能,应使用以下命令在打开花式框时创建TinyMCE控件:
If possible you should create the TinyMCE control when the fancybox is opened using this command:
tinyMCE.execCommand('mceAddControl', false, "control id here");
然后在关闭花式框时,也关闭TinyMCE控件:
Then when the fancybox is closed also close the TinyMCE control:
tinyMCE.execCommand('mceRemoveControl', false, "control id here");
这篇关于TinyMCE-在fancyboxm中第二次加载时未定义的'e','j','t'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!