tiptap/docs/api/extensions/list-keymap.md
bdbch 7e7057ea43
chore(lists): move list keymap to extra extension (#4290)
* move list keymap to extra extension

* update docs and readme

* move list helpers out of core
2023-08-10 16:44:46 -07:00

1.3 KiB

description icon
Add extra keymap handlers to change the default backspace and delete behavior for lists. asterisk

ListKeymap

Version Downloads

This extensions adds extra keymap handlers to change the default backspace and delete behavior for lists. Those are not included in the core package, because they are not required for the most basic use cases.

Installation

npm install @tiptap/extension-list-keymap

Settings

listTypes

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

Default:

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

Source code

packages/extension-list-keymap/

Usage

https://embed.tiptap.dev/preview/Extensions/ListKeymap