简体   繁体   English

tinyMCE textarea在一个tinyMCEPopup中

[英]tinyMCE textarea in a tinyMCEPopup

I created a plugin which opens a tinyMCEPopup. 我创建了一个打开tinyMCEPopup的插件。 In the tinyMCEPopup I have several textareas and need them to be tinyMCE textareas. 在tinyMCEPopup中,我有几个textareas,需要它们是tinyMCE textareas。 Here is a simplified example of the popup file: 以下是弹出文件的简化示例:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
</head>
<body>
<form action="#" id="multiBoxes">
    <textarea name="content" id="content" cols="50" rows="15" ></textarea>
</form>
</body>
</html>

I tried to init() it or tinyMCE.execCommand('mceAddControl', false, 'content'); 我试过init()或者tinyMCE.execCommand('mceAddControl', false, 'content'); ... but it does not work! ......但它不起作用! Any suggestion?! 有什么建议吗?!

Thanks 谢谢

Marco 马尔科

Try to use the correct ids: 尝试使用正确的ID:

tinyMCEPopup.execCommand('mceAddControl', false, my_textarea_id);

or 要么

tinyMCE.execCommand('mceAddControl', false, my_textarea_id);

Be aware that those ids need to be unique and that you should remove control onClose of the popup. 请注意,这些ID必须是唯一的,并且您应该删除对弹出窗口的控制onClose。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM