-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No longer works on tinymce 6.7 #93
Comments
I'm getting the same symptom with TinyMCE Version: 5.10.9 (2023-11-15). In my case too, the query is always an empty string. Haven't yet figured out a hack. |
TinyMCE Version: 5.10.8 (2023-10-19) works fine, so defect was injected with TinyMCE v5.10.9. |
I have a fix. CAUSE: TinyMCE v5.10.9 and v6.7.3 explicitly changed how the "zero width no-break space" character(U+FEFF) is handled. Unfortunately, the mention plugin uses U+FEFF as a delimiter for the user-entered search text. SOLUTION: Change the U+FEFF character to U+200B ("zero width space") in the 2 places it is used. Here's the affected lines. OLD# 67: '<span id="autocomplete-searchtext"><span class="dummy">\uFEFF</span></span>' +
#187: this.query = $.trim($(this.editor.getBody()).find('#autocomplete-searchtext').text()).replace('\ufeff', ''); NEW# 67: '<span id="autocomplete-searchtext"><span class="dummy">\u200b</span></span>' +
#187: this.query = $.trim($(this.editor.getBody()).find('#autocomplete-searchtext').text()).replace('\u200b', ''); The line numbers reference the un-minimized plugin of course, so you'll also need to make equivalent changes in the minimized version. I'll open a pull request, although I'm not sure whether it'll ever be merged as this plugin seems to no longer be actively maintained. I hope this helps others. |
Yes, this easy fix has brought back the functionality. Thank you! |
It does, thank you @mellevsen ! |
Fixed the project to work with tinymce 6.x |
I've been using this plugin for several years without any problem (with tinymce 5 and 6), but it recently stopped working. I've noticed it a few days ago; not sure exactly when it stopped working. Anyway, the current tinymce version is 6.7.3.
The problem seems to be located in the call to the source function. The function is called, but its 1st argument, the query, is always an empty string, so there is nothing to search for.
I guess something must have changed in tinymce, and this change has broken the plugin ?
Anyone has a clue on how to fix this ?
The text was updated successfully, but these errors were encountered: