tinymce / tinymce-blazor

Blazor integration
MIT License
45 stars 13 forks source link

Editor not loading #59

Open KoderK-Sharp opened 1 year ago

KoderK-Sharp commented 1 year ago

As the title suggests I have an issue where sometimes the editor will not load, I have followed the example for setting up a blazor app to use the hosted version of the editor component.

I'm sure its me doing something wrong so any pointers would be helpful

This is how the editor is added to the page, like I say it works most of the time but on the initial load of the component it doesnt seems to.

<TinyMCE.Blazor.Editor Conf="editorConf" @bind-Value="@Question.QuestionText" Field="() => Question.QuestionText" ApiKey="" />

There are 2 messages in the console output

Uncaught TypeError: Cannot read properties of undefined (reading 'length') at tinymce.min.js:9:26875 at HTMLLinkElement.h (tinymce.min.js:9:26961)

and

Uncaught TypeError: Cannot read properties of null (reading 'innerWidth') at jA. (theme.min.js:9:279034) at hA.dispatch (tinymce.min.js:9:372724) at jA.dispatch (tinymce.min.js:9:373978) at Array. (tinymce.min.js:9:400272) at Ne (tinymce.min.js:9:5303) at Object.KA (tinymce.min.js:9:400182) at ia.executeHandlers (tinymce.min.js:9:52234) at i (tinymce.min.js:9:50072)

exalate-issue-sync[bot] commented 1 year ago

Ref: INT-3127

KoderK-Sharp commented 1 year ago

Just a note, I have tried this both with the Conf supplied and excluded it happens in both cases.

KoderK-Sharp commented 1 year ago

Anyone?

jscasca commented 1 year ago

If it only happens sometimes it must be a race condition that is bound by load times. It would be hard to tell only providing the editor line of code. There must be something else in the page messing up the loadout. Do you have a reproduction by any chance? Happy to help

collinsmarra commented 1 month ago

I'm also running into the same problem with .NET 8, but only on the initial load.