Skip to content
This page is for Tiptap 2.x.See the latest version of this page.

List Keymap extension

VersionDownloads

The List Keymap extension modifies the default ProseMirror and Tiptap behavior. Without this extension, pressing backspace at the start of a list item keeps the list item content on the same line. With the List Keymap, the content is lifted into the list item above.

Install

npm install @tiptap/extension-list-keymap

Settings

listTypes

An array of list items and their parent wrapper node types.

ListKeymap.configure({
  listTypes: [
    {
      itemName: 'taskItem',
      wrapperNames: ['customTaskList'],
    },
  ],
})

Default value:

[
  {
    "itemName": "listItem",
    "wrapperNames": ["bulletList", "orderedList"]
  },
  {
    "itemName": "taskItem",
    "wrapperNames": ["taskList"]
  }
]

Source code

packages/extension-list-keymap/