mkhstar / suneditor-react

A React Component for SunEditor (WYSIWYG editor)
http://suneditor.com/
424 stars 105 forks source link

Cannot read properties of null (reading 'style') #346

Open xa11der opened 8 months ago

xa11der commented 8 months ago

Hello there,

While utilizing SunEditor to store a base64 image in a database, I'm facing an issue where the image is encapsulated within a div element with the class se-component. This encapsulation leads to a type error Cannot read properties of null (reading 'style'). Interestingly, when I remove this class, the image is stored correctly, but now alignment classes can't be applied (e.g. __se__float-right).

Also, there is an error in the class

 .sun-editor-editable .__se__float-center {
    float: center;
}

Thank you in advance, xa11der

ingo-rauner commented 8 months ago

Please fix this bug timely. It leads to crashes of the UI. We had to modify some of the code ourselves to create a workaround for the crash issue.

ivan-kralik commented 8 months ago

I also confirm this issue