How to use the prosemirror-commands.baseKeymap.Backspace function in prosemirror-commands

To help you get started, we’ve selected a few prosemirror-commands examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ifiokjr / remirror / @remirror / core-extensions / src / extensions / base-keymap-extension.ts View on Github external
public keys() {
    const { selectParentNodeOnEscape, undoInputRuleOnBackspace } = this.options;
    const backspaceRule: KeyboardBindings = undoInputRuleOnBackspace
      ? { Backspace: chainCommands(undoInputRule, baseKeymap.Backspace) }
      : {};
    const escapeRule: KeyboardBindings = selectParentNodeOnEscape ? { Escape: selectParentNode } : {};

    return { ...baseKeymap, ...backspaceRule, ...escapeRule };
  }
}
github ifiokjr / remirror / @remirror / core-extensions / src / extensions / base-keymap.ts View on Github external
public keys() {
    const { selectParentNodeOnEscape, undoInputRuleOnBackspace } = this.options;
    const backspaceRule: KeyboardBindings = undoInputRuleOnBackspace
      ? { Backspace: chainCommands(undoInputRule, baseKeymap.Backspace) }
      : {};
    const escapeRule: KeyboardBindings = selectParentNodeOnEscape ? { Escape: selectParentNode } : {};

    return { ...baseKeymap, ...backspaceRule, ...escapeRule };
  }
}