Essentially, when you click inside the table the buttons get active, and when you click outside it gets removed. and the column drag to create new table columns. (if anyone have any example on this please share)
As I did with all my other components, I have build all my node views manually by forking prosemirror and then customizing them.
but when I am not able to fork tableEditing() plugin.
When I fork each and everything from the prosemirror-tables to my codebase, it gives me an error known as
|- RangeError: Duplicate use of selection JSON ID cell (screenshot attached)
Do you have any suggestions on how can I proceed?
This is what I am doing right now if it helps
Here is the gist for the tableEditing file I have created:
This means you are loading multiple Selection subclasses that all try to register the cell ID for their JSON serialization format. Most likely, you have multiple instances of prosemirror-tables in your dependency tree, and are loading them at the same time. npm ls -a can sometimes show where these are coming from. Using npm, rather than yarn, generally fixes these errors. (Yarn is dumb about upgrading, and randomly duplicates packages.)
I am trying to recreate tableEditing plugin (gist file attached in the original post) and whatever is being imported from prosemirror-tables i am importing that file as well.
I am not sure why this error still comes.
I am able to successfully fork columnResizing plugin, tableNodes, tableNodeView.
but this “tableEditing” is throwing some error.
Do you think this is the right way to do things as i want to heavily customize prosemirror-tables??
Do you see any wrong practice used in the file attahced because there were a lot of TS errors when i copied the original files liek CellSelection, etc.
But did you upgrade dependencies? With yarn? That’ll reliably mess up your tree and you’ll have to clear your package lock to fix it. (Or use npm. I really recommend using npm.)
@nickthesick my intention is not to waste anyone’s time, I have posted this comment about the same time as I opened the issue on GitHub, neither were answered when I was posting these. You can consider the issue closed on my end.