UNPKG

slate-edit-table

Version:

A Slate plugin to handle keyboard events in tables.

9 lines (7 loc) 288 B
module.exports = function(plugin, state) { const cursorBlock = state.document.getDescendant('_cursor_'); const transform = state.transform(); state = transform.moveToRangeOf(cursorBlock).apply(); return plugin.transforms.removeRow(state.transform()) .apply(); };