【发布时间】:2013-04-29 21:12:42
【问题描述】:
我正在使用 joomla 内置函数在 jQuery 对话框内的页面上创建 tinyMCE 编辑器。但是,出现对话框,并且 tinyMCE 编辑器就像它处于只读模式一样。
这是回显编辑器的 php 内置函数:
<div id="PhoneCallCard" title="Phone Call Card" style="display:none;">
<?php
$editor = JFactory::getEditor();
echo $editor->display('commentz', $this->content, '600', '100', '60', '20', false);
?>
</div>
这是我打开该对话框的 jQuery 实现:
jQuery("#PhoneCallCard").dialog({
height:500,
width:800,
modal: true,
close: function(ev, ui){
jQuery('#tablepanelfightclubrequests .trSelected').removeClass('trSelected');
},
open:function({ //Everything I tried to activate the tinyMCE
//tinyMCE.activeEditor.getBody().setAttribute('contenteditable', false);
//tinyMCE.execCommand('mceRemoveControl',false,'commentz');
//tinyMCE.execCommand('mceAddControl',false,'commentz');
//tinyMCE.execCommand('mceFocus', false, 'commentz');
}});
我在Why can't I type in TinyMCE in my jQueryUI modal dialog? 和TinyMCE and JQuery dialog: TinyMCE read only when modal:true in the Dialog 也发现了类似的问题,但都不能解决我的问题
【问题讨论】: