我使用的是内置的joomla函数在jQuery对话框中的页面上创建tinyMCE编辑器。但是,出现对话框并且tinyMCE编辑器就像它处于只读模式。无法在joomla中的jQueryUI对话框中输入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,但都不能解决我的问题