-
Notifications
You must be signed in to change notification settings - Fork 220
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
dynamic import in webpack produces hidden TinyMCE #1466
Comments
If the editor is in the page but hidden that suggests the styles haven't loaded (our technique for avoiding flash of unstyled editor is Two questions:
|
I followed the instructions in the documentation for using ES2015 modules which said I needed to import a theme.
Yes, a typo. I've fixed it in the question.
Will do. Thanks. |
I checked paths. When I do a regular import, the css is downloaded from the expected public/build directory (e.g. https://example.com/public/build/skins/contents/default/content.css). When I do a dynamic import, the css path is relative to the current webpage (e.g. https://example.com/somepage//skins/contents/default/content.css). I tried removing the |
Ah, yes the ES2015 instructions assume you want to bundle the theme and plugins so they're imported directly. It's all related to baseurl calculations for loading resources from the server, I'm not sure how dynamic import operates at runtime but it might be difficult to resolve the I think we have a way to set the baseurl manually 🤔 I'll try to find some time this week to track that down for you. |
Looks like the docs are missing the details about including the skins when using a module loader, so I'm going to move this to the docs repo to get that information added. For reference, some others community member found a solution to import the skins that should work for you here: tinymce/tinymce#2836 (comment) or a variant that's more specific to angular, but should be able to be applied more broadly can be found here: tinymce/tinymce#4886 (comment) If that doesn't work and you don't want to bundle the skins, then as @TheSpyder mentioned you'd need to manually set the |
Hi @dnagirl , We've replaced the old documentation. Our webpack instructions now provide instructions for ensuring the editor loads correctly. Tyler |
What is the current behavior? Describe the bug
When tinyMCE is imported asynchronously, the resulting output is invisible. If tinyMCE is imported normally, it works as expected.
Please provide the steps to reproduce and if possible a minimal demo of the problem via fiddle.tinymce.com or similar.
configTinymce.js
app.js with regular import (works)
app.js with deferred import (TinyMCE initializes but hides display)
This is the tinyMCE html output after deferred import:
What is the expected behavior?
TinyMCE should be visible
Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE?
The text was updated successfully, but these errors were encountered: