jacques_ca
7 years agoMaven
TinyMCE - Add text in the editor
Hi
I tried to add some content in the text editor. It works, when I use the code below in the console, however when I use it in the component, it seems that the code is not executed.
tinymce.activeEditor.execCommand('mceInsertContent', false, " <p id='123'>bolded text</p> "); $(tinymce.activeEditor.getBody()).one('click', function() { $(tinymce.activeEditor.getBody()).find('p').empty(); });
Is there a sort of initialization or wrapper that I need to add?