ListItem extension
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
Command | Windows/Linux | macOS |
---|---|---|
splitListItem() | Enter | Enter |
sinkListItem() | Tab | Tab |
liftListItem() | Shift + Tab | Shift + Tab |