Mattia
Mattia

Reputation: 41

tinyMCE in tinyMCePopup

I created a plugin which open a tinyMCEPopup. The tinyMCEPopup is a html file with a form and i need to have a tinyMCE textarea in it. here is the structure of the popup:

<!DOCTYPE html>
<head>
  <title></title>
  <script type="text/javascript">
  </script>
</head>
<body>
  <form>
    <textarea id="mceEditor"></textarea>
  </form>
</body>
</html>

I tried to use:

tinyMCEPopup.execCommand('mceAddControl',false,'mceEditor');
or
tinyMCE.execCommand('mceAddControl',false,'mceEditor');

and the tinyMCE.init() function but it doesn't work.

Thanks in advance.

Upvotes: 0

Views: 248

Answers (1)

Adam Mo.
Adam Mo.

Reputation: 772

try

tinyMCE.execCommand("mceAddEditor", true, 'mceEditor');

Upvotes: 1

Related Questions