-
Notifications
You must be signed in to change notification settings - Fork 92
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
tinymce not initializing second time I enter the component #197
Comments
I "solved" it with this fix. <editor *ngIf="_reload" > public _reload = true; Not my proudest moment as a developer but it works for now. If anyone can figure out a more permanent fix it would be appreciated. |
I have a similar problem with using *ngIf on the editor tag. My situation is slightly more complicated, but it looks like the OP boiled it down to something pretty basic already. Maintainers please chime in if you need more info; I am happy to provide it. I am a bit dumbfounded by this error. I thought Angular doesn't instantiate the component if the *ngIf statement is false, but I guess it does, as I get a big heaping couple errors in the console when TinyMCE isn't even supposed to be loading. A screenshot of them is attached here. |
same console errors for me... I have |
@linusanderas Do you have, by any chance, a small codesandbox replication we can use? |
@jscasca We've also ran into this. On the second initialization, the iframe's body is empty. I cannot follow why it wouldn't even have the class I've debugged it down to this point: https://github.com/tinymce/tinymce/blob/9c01df42d50c4c3a9a89453d9f157afe657a32a9/modules/tinymce/src/core/main/ts/init/InitContentBody.ts#L386 where even here, the Logging out the |
I ran into the same issue on a regular (i.e. non-Ionic) Angular app.
|
Ref: INT-2502 |
Anyone find a fix for this ? I believe I'm running into the same issue. I found the timeout fixes it for me but it's based on network speed. Ie i need a 500ms timeout to make it go away. If i use the Chrome network throttler than 500ms gives me the script errors. |
Seems like this might be the same issue in react: If we can figure out the solution to one it'll probably fix both. |
Here is my solution |
have the same issue! router events are not fired with material tabs... and patching this other case by handling tab change event it is not a very good angular solution! The user has to wait for initialization each time he changes tab... after editor initialization we could try something to call tinyMCE destroyer when tab is changed and editor does not exist anymore in the DOM, something like this:
Is this a good workaround? |
This issue is stale because it has been open 30 days with no activity. Please comment if you wish to keep this issue open or it will be closed in 7 days. |
This issue is stale because it has been open 30 days with no activity. Please comment if you wish to keep this issue open or it will be closed in 7 days. |
I fear I have a related issue when using the editor in an ngFor. After changing the order of the elements some of the editors are not usable anymore. We tried to fix this through reinitializing in Currently we either have to memory leaks or non working editors. The only idea I have left is adding tinymce directly without the angular wrapper or implementing a different rich text editor. Are there any workaround beside the already mentioned? |
I have an Ionic-project and the first time when I enter a page/component tinymce loads just fine.
Next time when I visit the page the editor is not working. Does anyone has an idea of what it can be?
The text was updated successfully, but these errors were encountered: