Command identifiers for tinymce 4.x (mceAddControl)

I am moving from tinyMCE 3.x to the latest version of tinyMCE 4.x. My problem is that I have dynamic generation of tinyMCE instances, so in 3.x I used:

tinymce.EditorManager.execCommand('mceAddControl', true, "content_txt"); 

but in version 4.x this does not work. I started checking the documentation, but I can not find the identifiers for version 4.x

+4
source share
3 answers

Migration is very simple, replace

 tinymce.EditorManager.execCommand('mceAddControl', true, "content_txt"); 

by

 tinymce.EditorManager.execCommand('mceAddEditor', true, "content_txt"); 

If you want to rotate it, you can use

 tinymce.EditorManager.execCommand('mceRemoveEditor', false, "content_txt"); 
+6
source

Use mceRemoveEditor/mceAddEditor exactly the same commands as indicated here http://www.tinymce.com/forum/viewtopic.php?id=31256

+1
source

add / remove execCommands editor worked, but lost configuration editor. I found that these show / hide methods are more equivalent to the old add / remove control commands.

 tinyMCE.editors[id].show(); tinyMCE.editors[id].hide(); 
0
source

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


All Articles