-
-
Notifications
You must be signed in to change notification settings - Fork 38
Simple-Token autocomplete not working in TinyMCE (HTML) #270
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
Comments
Can confirm. The developer console throws an error. |
Maybe the same issue as #262 |
@contaoacademy possibly, but the behavior is slightly different. TinyMCE does not load for me at all when I use Contao 4.13. |
Now that my tinyMCE is showing again I was able to look into the autosuggester problem. I'm not familiar with tinyMCE at all but the problem seems to be in // Add the events to tinyMCE
if (this.tinyMCE) {
if (window.tinyMCE.majorVersion == '4') {
this.tinyMCE.on('keyUp', function(event) {
this.eventKeyUp.call(this, event);
}.bind(this));
Knowing virtually nothing about tinyMCE I don't know if this is the proper solution. However at least in my installation, instead of looking for the version number checking for the existence of the // Add the events to tinyMCE
if (this.tinyMCE) {
if (typeof this.tinyMCE.on === 'function') {
this.tinyMCE.on('keyUp', function(event) {
this.eventKeyUp.call(this, event);
}.bind(this)); Let me know if this is the right approach I could try creating a pull request .. would have to figure out how to minify the Javascript properly though 🤡 . If switching out the line and minifying the JS is something that comes easy in your development workflow I will be happy if anyone else wants to do it. |
@contaoacademy , @cliffparnitzky feel free to try out https://github.com/philvdb/contao-notification_center to see whether it solves the problem for you as well and report back here. |
@philvdb Looks great! Works for me. Thank you. |
If I type
##
in the RAW text-window, then autocomplete comes up automatically for me.If I enable text and HTML and try to do the same in TinyMCE, then autocomplete does not show up.
Currently, I could only reproduce the problem under Contao 4.13 because under Contao 4.9 it still works as expected.
The text was updated successfully, but these errors were encountered: