slate-edit-table
slate-edit-table copied to clipboard
Support multiple cell types
I have plugin set up like this:
const tablePlugin = PluginEditTable({
typeTable: ['table'],
typeRow: ['table_row'],
//<th> and <td> elements
typeCell: ['table_cell', 'table_heading']
});
adding this parameter object for PluginEditTable like above breaks the functionality of the isSelectionInTable function, with this breaking most of the plugin functionality as it can't recognize the table. However removing that object parameter from PluginEditTable fixes it:
const tablePlugin = PluginEditTable();
This problem is encountered when I want to deserialize table with multiple cell types like
The plugin currently only supports a single type of cells (not an array of types). I rename this issue to be a feature request for this.
Have you tried, as a workaround, to set custom data to your cells ?