tinymce / tinymce-angular

Official TinyMCE Angular Component
MIT License
324 stars 93 forks source link

Editor inside mat-tab giving error when loading #184

Closed dssantana-zz closed 3 years ago

dssantana-zz commented 3 years ago

What is the current behavior? Having an editor inside a material mat-tab is giving an error in the console If the mat-tab is position in the first place, this is not happening, no errors appeared, but if it is not shown when loaded, the following exception is shown in the console.

Uncaught TypeError: Cannot read property 'length' of undefined at tinymce.min.js:9 at c (tinymce.min.js:9) at HTMLLinkElement.l [as __zone_symbol__ON_PROPERTYload] (tinymce.min.js:9) at HTMLLinkElement.wrapFn (zone-evergreen.js:1218) at ZoneDelegate.invokeTask (zone-evergreen.js:399) at Zone.runTask (zone-evergreen.js:167) at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:480) at invokeTask (zone-evergreen.js:1621) at HTMLLinkElement.globalZoneAwareCallback (zone-evergreen.js:1647)

Please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox.io or similar.

What is the expected behavior?

Which versions of TinyMCE/TinyMCE-Angular, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or TinyMCE-Angular?

SimonFc commented 3 years ago

This is a known issue which is due to TinyMCE's usage of an iframe. See this storybook example for a possible work around. Hope this helps!

dssantana-zz commented 3 years ago

Thanks @SimonFc