diff --git a/mention/plugin.js b/mention/plugin.js index 2102356..7b8546e 100644 --- a/mention/plugin.js +++ b/mention/plugin.js @@ -69,7 +69,11 @@ this.editor.execCommand('mceInsertContent', false, rawHtml); this.editor.focus(); - this.editor.selection.select(this.editor.selection.dom.select('span#autocomplete-searchtext span')[0]); + this.editor.selection.select( + this.editor.selection.dom.select( + 'span#autocomplete-searchtext span#autocomplete-delimiter' + )[0] + ); this.editor.selection.collapse(0); }, @@ -408,4 +412,4 @@ tinymce.PluginManager.add('mention', tinymce.plugins.Mention); -}); \ No newline at end of file +});