2020-08-19 03:39:41 +08:00
# BulletList
2020-09-15 23:26:42 +08:00
This extension enables you to use bullet lists in the editor. They are rendered as `<ul>` HTML tags,
2020-08-19 03:39:41 +08:00
2020-09-23 18:03:03 +08:00
Type < code > * < / code > , < code > - < / code > or < code > + < / code > at the beginning of a new line and it will magically transform to a bullet list.
2020-09-15 23:26:42 +08:00
2020-09-23 18:03:03 +08:00
## Installation
2020-09-15 23:26:42 +08:00
::: warning Use with ListItem
The `BulletList` extension is intended to be used with the [`ListItem` ](/api/extensions/list-item ) extension. Make sure to import that one too, otherwise you’ ll get a SyntaxError.
2020-08-19 03:39:41 +08:00
:::
2020-09-23 15:52:04 +08:00
```bash
# With npm
2020-09-23 18:03:03 +08:00
npm install @tiptap/extension -bullet-list @tiptap/extension -list-item
2020-09-23 15:52:04 +08:00
# Or: With Yarn
2020-09-23 18:03:03 +08:00
yarn add @tiptap/extension -bullet-list @tiptap/extension -list-item
2020-09-23 15:52:04 +08:00
```
2020-09-23 18:03:03 +08:00
## Settings
2020-09-10 16:21:24 +08:00
| Option | Type | Default | Description |
| ------ | ------ | ------- | -------------------------------------------- |
| class | string | – | Add a custom class to the rendered HTML tag. |
2020-08-19 03:39:41 +08:00
2020-08-20 21:33:16 +08:00
## Commands
2020-09-10 16:21:24 +08:00
| Command | Options | Description |
| ----------- | ------- | --------------------- |
| bullet_list | — | Toggle a bullet list. |
2020-08-19 03:39:41 +08:00
2020-09-10 17:24:33 +08:00
## Keyboard shortcuts
2020-09-27 17:01:25 +08:00
* `Control` `Shift` `8`
2020-08-19 03:39:41 +08:00
2020-09-21 22:59:28 +08:00
## Source code
2020-09-15 22:50:54 +08:00
[packages/extension-bullet-list/ ](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-bullet-list/ )
2020-08-19 03:39:41 +08:00
2020-09-15 22:50:54 +08:00
## Usage
< demo name = "Extensions/BulletList" highlight = "3-5,17-18,37-38" / >