tiptap/docs/api/nodes/bullet-list.md
2021-12-11 00:13:24 +01:00

1.7 KiB

description icon
Everything looks more serious with a few bullet points. list-unordered

BulletList

Version Downloads

This extension enables you to use bullet lists in the editor. They are rendered as <ul> HTML tags.

Type , or at the beginning of a new line and it will magically transform to a bullet list.

Installation

npm install @tiptap/extension-bullet-list @tiptap/extension-list-item

This extension requires the ListItem node.

Settings

HTMLAttributes

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

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

itemTypeName

Specify the list item name.

Default: 'listItem'

BulletList.configure({
  itemTypeName: 'listItem',
})

Commands

toggleBulletList()

Toggles a bullet list.

editor.commands.toggleBulletList()

Keyboard shortcuts

Command Windows/Linux macOS
toggleBulletList Control Shift 8 Cmd Shift 8

Source code

packages/extension-bullet-list/

Usage

https://embed.tiptap.dev/preview/Nodes/BulletList