TinyMCE textarea in tiny MCEPopup

I created a plugin that opens tinyMCEPopup. In tinyMCEPopup, I have several text fields and they should be tinyMCE text areas. The following is a simplified example of a 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 run init () or tinyMCE.execCommand('mceAddControl', false, 'content');... but that wont work! Any suggestion?!

thank

Marco

+3
source share
1 answer

Try using the correct identifiers:

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

or

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

Keep in mind that these identifiers must be unique and that you must remove the control when closing the popup.

0
source

Source: https://habr.com/ru/post/1783605/


All Articles