jodit / jodit-react

React wrapper for Jodit
MIT License
354 stars 118 forks source link

Delete cells from table throws an Error #252

Open FabDonRixos opened 6 months ago

FabDonRixos commented 6 months ago

Jodit Version: ^1.3.39

Browser: Chrome OS: Windows Is React App: True

Code You can use the demo from https://xdsoft.net/jodit/

Steps

  1. Insert a table.
  2. Select some cells image
  3. Press Backspace/Delete
  4. In the demo there will only be an error in the console, will in my project there is a fullscren runtime error

Expected behaviour: The component should catch the error and just leave it there, or better, delete the selected cells.

Actual behaviour: The error is thrown: Failed to execute 'insertNode' on 'Range': Nodes of type '#text' may not be inserted inside nodes of type '#document'.

ivxn97 commented 3 months ago

Any solution for this?

FabDonRixos commented 3 months ago

Any solution for this?

Sadly I haven’t found a solution by now. I just accepted it and lucky only my PO is using it to create Messages so I told him not to delete tables like this