TinyMCE - 未定义“e”、“j”、“t”在 fancyboxm 中第二次加载时
早晨。
我目前正在尝试向我的应用程序添加快速编辑功能。我只是使用 fancybox 传递数据,将适当的数据加载到tinymce 中。
问题是,一旦我第一次关闭 fancybox 并移至第二个项目进行编辑和单击,所有内容都加载正常(包括tinyMCE),但我无法在所见即所得编辑器中进行编辑,firebug 显示未定义的“e”或't' 或 'd' 无论它决定显示哪一个......
任何帮助将不胜感激。
编辑
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);}
Morning.
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.
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...
any help would be muchly appreciated.
EDIT
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);}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果 TinyMCE 的控件被其他东西删除然后重新打开,就会出现问题,就像 fancybox 所做的那样。
如果可能,您应该使用以下命令在打开 fancybox 时创建 TinyMCE 控件:
然后,在关闭 fancybox 时也关闭 TinyMCE 控件:
TinyMCE will have problems if its controls are removed by something else then reopened, as it seems that fancybox is doing.
If possible you should create the TinyMCE control when the fancybox is opened using this command:
Then when the fancybox is closed also close the TinyMCE control: