Issues creating a tinyMCE plugin that creates a custom link

Change this:

ed.execCommand('mceInsertContent', 0, return_text);

To this:

ed.execCommand('mceInsertContent', false, return_text);

The second argument of the tinyMCE.execCommand() function is a boolean value that states if a UI needs to be presented to the user.

Reference:
http://www.tinymce.com/wiki.php/API3:method.tinymce.execCommand

Leave a Comment