ListItem extension

VersionDownloads

The ListItem extension adds support for the <li> HTML tag. It’s used for bullet lists and ordered lists and can’t really be used without them.

Modify backspace behavior

If you want to modify the standard behavior of backspace and delete functions for lists, you should read about the ListKeymap extension.

Install

npm install @tiptap/extension-list-item

This extension requires the BulletList or OrderedList node.

Settings

HTMLAttributes

Custom HTML attributes that should be added to the rendered HTML tag.

ListItem.configure({
  HTMLAttributes: {
    class: 'my-custom-class',
  },
})

Keyboard shortcuts

CommandWindows/LinuxmacOS
splitListItem()EnterEnter
sinkListItem()TabTab
liftListItem()Shift + TabShift + Tab

Source code

packages/extension-list-item/