Handsontable widget

I want to put a Handsontable widget in prosemirror , can you give me a hint about the schema and how?

1 Like

There’s roughly two approaches here. Both would involve a node view that renders your table nodes using Handsontable.

  • You can model the whole table in your ProseMirror schema, and carefully map changes in the table control to the proper ProseMirror steps (and vice versa, sync the table when its ProseMirror representation changes). This would make it possible to do collaborative editing inside the table.

  • You can treat the table as an opaque blob, and either store it elsewhere or put a representation of its content in a node attribute. Syncing would be all-or-nothing, which may require some additional logic to keep the selection inside the table intact.

1 Like

thank you.:slight_smile: