Closed codescriptor closed 2 years ago
The same problem for me
May be the tinymce theme folder interfere with the theme management of vaadin
resources/META-INF/resources/frontend/tinymce_addon/tinymce/themes
This error has also stopped us in our tracks from doing an upgrade to 14.6.x !!! Unfortunate as we heavily rely upon the tiny MCE component.
We found the solution, we migrated project to cloud
In class TinyMce, added annotation @JavaScript("https://cdn.tiny.cloud/1/no-api-key/tinymce/5/tinymce.min.js")
Removed package https://github.com/mstahv/tinymce-for-flow/tree/master/src/main/resources/META-INF/resources/frontend#:~:text=tinymce_addon/tinymce
Changed vaadin version to latest (14.6.8) in pom for
Unfortunately this solution will not work for us as we are not allowed to use and CDN references in our code. So still need this fixed to use a local copy of tinymce.min.js.
Seems like the problem with local tinymce is that it inside can't resolve all resources in right way in js library. I'm not sure is it possible to fix that with vaadin, maybe tinymce team can help with that.
Migrated TinyMce to a new addon template with local tiny js libraries. Works on my machine :) https://github.com/gagarina6794/pandateam-tinymce/tree/tiny-mce-for-flow
Hi all! I don't think that renaming the theme folder in tinymce library is a good idea, we shouldn't change that API, it's not a flexible solution for the future. I found one more solution.
-- change vaadin version to latest (14.6.8) for vaadin-bom vaadin-maven-plugin
-- change import from @JavaScript("frontend://tinymceConnector.js") to @JavaScript("./tinymce_addon/tinymce/tinymce.min.js") @JavaScript("./tinymceConnector.js")
-- remove method - injectTinyMceScript();
-- set in initConnector() method next line config.put("base_url", "frontend/tinymce_addon/tinymce"); after this.initialContentSent = true;
This works and successfully works with both 21.0.7 and the latest TinyMCE. Please note that with the latest production version of tiny MCE you need to rename/copy the .min.js files to .js. or set the suffix to ".min" as per https://www.tiny.cloud/docs/configure/integration-and-setup/#suffix .
Hi all! I don't think that renaming the theme folder in tinymce library is a good idea, we shouldn't change that API, it's not a flexible solution for the future. I found one more solution.
- In pom:
-- change vaadin version to latest (14.6.8) for vaadin-bom vaadin-maven-plugin
- In TinyMce class
-- change import from @javascript("frontend://tinymceConnector.js") to @javascript("./tinymce_addon/tinymce/tinymce.min.js") @javascript("./tinymceConnector.js")
-- remove method - injectTinyMceScript();
-- set in initConnector() method next line config.put("base_url", "frontend/tinymce_addon/tinymce"); after this.initialContentSent = true;
As far as I see the changes are implemented in version 3.2.0. Should this issue be closed?
Yup, thanks for the heads up!
When switching from Vaadin 14.5.5 to Vaadin 14.6.4 (any minor version of Vaadin 14.6) next error appears in console:
It crashes all other custom styles and UI looks ugly.
The version of tinymce-for-flow is 3.1.0.