tinyMCE and jQuery dialog box issue
I am using TinyMCE inside of a jQuery dialog box. To get the editor to work, I had to set the mode from "textareas" to "none". However doing that, makes the toolbar disappear.
This shows the toolbar, but the actual editing window does not works:
tinyMCE.init({
theme: "advanced",
mode: "textareas",
theme_advanced_toolbar_location: "top"
});
This causes the editing window to work, but the toolbar is missing:
tinyMCE.init({
theme: "advanced",
mode: "none",
theme_advanced_toolbar_location: "top"
});
Is there a way to get the toolbar back while having mode: "none"?
Thanks
You should use the second approach. The editor is not working there, but the textarea is. What ouy still need to do is to init the editor using the mceAddControl
action. Here is the code and a link to a working tinymce fiddle:
<script type="text/javascript">
tinyMCE.init({
theme: "advanced",
mode: "none",
theme_advanced_toolbar_location: "top"
});
tinymce.execCommand('mceAddControl',false,'textarea_id' );
</script>
<form method="post" action="dump.php">
<textarea id="textarea_id" name="content"></textarea>
</form>
链接地址: http://www.djcxy.com/p/61474.html
上一篇: 无法在joomla的jQueryUI对话框中输入TinyMCE编辑器
下一篇: tinyMCE和jQuery对话框的问题