Custom options not working in version 6
What is the current behavior? Describe the bug
Custom options in editor.settings not allowed since v6? I found no hint in https://www.tiny.cloud/docs/tinymce/6/migration-from-5x/#plugins for this.
Please provide the steps to reproduce and if possible a minimal demo of the problem via fiddle.tiny.cloud or similar.
See demo https://fiddle.tiny.cloud/Khiaab which is set to tinymce version 5.10.5
- First open browser inspector tab "console"
- Press "enter"-key in editor and see line "ENTER" in console (inspector). This is working.
- Now change tinymce version 5.10.5 to 6.x and click on "Run"-button
- Now press again "enter"-key and you get a error message in console
Uncaught TypeError: Cannot read properties of undefined (reading 'custom_option')
What is the expected behavior?
No error.
Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE?
All browser. Version 5 working fine (and before). Now in Version 6 I get a error.
Is here a workaround?
It seems this information is missing in the migration guide sorry, but it is noted in the release notes that the editor.settings property was replaced with the editor.options API: https://www.tiny.cloud/docs/tinymce/6/6.0-release-notes-core-changes/#editor-options.
The editor options API is documented in more detail here: https://www.tiny.cloud/docs/tinymce/6/apis/tinymce.editoroptions/. Also here's an updated fiddle using that API: https://fiddle.tiny.cloud/Khiaab/1
As this is an issue with this information missing in the migration documentation I'm going to transfer this to the tinymce-docs repo instead.
No need for sorry, thanks you very much for this hint and links. :)