我使用的是內置的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,但都不能解決我的問題