Forum Discussion
luk
7 years agoBoss
jacques_ca or you just hook properly into the event lifecycle of TinyMCE =):
// runs when an editor instance is added to the EditorManager list tinymce.on('addeditor', function(e) { var editor = e.editor; // wait for this particular editor instance to be initialized editor.on('init', function(e) { // when the editor is initialized, add the custom text editor.execCommand('mceInsertContent', false, '<p id="123">bolded text</p>'); }); }, true);
but of course you can also use the setTimeout() approach and hope for the best!
Related Content
- 4 years ago
- 2 years ago
- 2 years ago
- 3 years ago
- 8 years ago