JiHong88 / suneditor

Pure javascript based WYSIWYG html editor, with no dependencies.
http://suneditor.com
MIT License
1.67k stars 308 forks source link

Adding image sometimes throws error #1366

Open numanbaig opened 4 months ago

numanbaig commented 4 months ago

adding image sometimes throws error Error: Uncaught TypeError: Cannot read properties of null (reading 'previousElementSibling') at Object.removeNode (core.js:2146:45) at Object.insertComponent (core.js:1565:28) at Object.create_image (image.js:677:18) at Object.onRender_imgBase64 (image.js:556:30) at Object. (image.js:533:63)

To Reproduce Steps to reproduce the behavior: add multiple images

Expected behavior should add images without error

Screenshots image

inday-jin commented 4 months ago

editor getRange_addLine function add

editor.core.getRange_addLine(editor.core.getRange()); await uploadHandler(response);

Lokheim commented 4 months ago

editor getRange_addLine function add

editor.core.getRange_addLine(editor.core.getRange()); await uploadHandler(response);

Where to put this code when i use react-suneditor ?