react-ckeditor icon indicating copy to clipboard operation
react-ckeditor copied to clipboard

do an automatic reload when ckeditor has not been loaded.

Open dan753722 opened this issue 7 years ago • 5 comments

We found this issue when using react-ckeditor-component in our app.

When browser first visits our page, with no cache etc. ckeditor doesn't gets rendered. We can see this error in the console: CKEditor Uncaught TypeError: Cannot call method 'unselectable' of null.

Not sure why, however, it feels like ckeditor throws that error during its editor instance initialization.

You can very reliably reproduce this issue in Internet Explorer 11, by clearing browser history.

My current solution is to have a 3-second delayed check on the editorinstance and if the editor ui failed to initialize after 3 seconds. we false loadscript process again. Only this time, ckeditor.js is loaded already in the dom.

dan753722 avatar Mar 06 '18 14:03 dan753722

Not merging it for now because this does not seem to be a permanent fix. Re-initialising after 3 seconds may not suit everyone's needs. Will look into this later.

codeslayer1 avatar Mar 14 '18 05:03 codeslayer1

suggest anyone who face this problem. set a loading status for you container and render <CKeditor /> after loading complete. I think it work for many case (for now).

flameddd avatar Mar 21 '18 08:03 flameddd

@dan753722 @flameddd Can you guys please test this fix by @R0nd - #29. Will merge the pull request if this fixes the issue.

codeslayer1 avatar Mar 21 '18 09:03 codeslayer1

I published the fork with fixes to npm as r0nd_react-ckeditor-component if anyone wants to try it.

R0nd avatar Mar 30 '18 08:03 R0nd

Seeing this issue even with r0nd_react-ckeditor-component.

hafeezpk avatar Aug 07 '18 14:08 hafeezpk