OverviewFilesCommitsIssuesDocsReleasesPeers

keet-deobfuscated / @holepunchto / keet-editor / src / extensions / list-item.js

13 lines · javascript ref:
import { ListItem as t } from "@tiptap/extension-list-item"
export const ListItem = t.extend({
  addKeyboardShortcuts() {
    return {
      "Shift-Enter": () => this.editor.commands.splitListItem("listItem"),
      "Ctrl-Enter": () => this.editor.commands.splitListItem("listItem"),
      "Alt-Enter": () => this.editor.commands.splitListItem("listItem"),
      Tab: () => this.editor.commands.sinkListItem("listItem"),
      "Shift-Tab": () => this.editor.commands.liftListItem("listItem"),
    }
  },
})