I have several drop-down boxes that should insert dynamic text (as selected) at the cursor position in a tinyMCE-enabled text editor.
I found a lot of posts related to the above problem, as shown below, and it does not currently work with my code, and also does not give any errors in the console.
tinyMCE.execInstanceCommand('text',"mceInsertContent",false,"This is the text to be inserted");
// here 'text' is id of textarea on which TinyMCE is rendered
I assume that when I click on the drop-down list, I lose focus in a text editor, but still I canβt fix it.
Any help would be appreciated.
source
share