You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to delete the table node with the Backspace key? thanks.
editor.action((ctx) => {
const view = ctx.get(editorViewCtx);
const { state } = view;
if (!state.tr) {
return false;
}
if (state.tr.doc) {
let firstChild = state.tr.doc.firstChild;
if (firstChild){
state.tr.deleteNode(firstChild) # need some method like deleteNode
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I can use this to delete selected table. But I must select all the cells at first.
Is there a way to delete the table node with the Backspace key? thanks.
Beta Was this translation helpful? Give feedback.
All reactions