39 lines
1.6 KiB
Markdown
39 lines
1.6 KiB
Markdown
# BulletList
|
|
[](https://www.npmjs.com/package/@tiptap/extension-bullet-list)
|
|
[](https://npmcharts.com/compare/@tiptap/extension-bullet-list?minimal=true)
|
|
|
|
This extension enables you to use bullet lists in the editor. They are rendered as `<ul>` HTML tags.
|
|
|
|
Type <code>* </code>, <code>- </code> or <code>+ </code> at the beginning of a new line and it will magically transform to a bullet list.
|
|
|
|
## Installation
|
|
```bash
|
|
# with npm
|
|
npm install @tiptap/extension-bullet-list @tiptap/extension-list-item
|
|
|
|
# with Yarn
|
|
yarn add @tiptap/extension-bullet-list @tiptap/extension-list-item
|
|
```
|
|
|
|
This extension requires the [`ListItem`](/api/nodes/list-item) node.
|
|
|
|
## Settings
|
|
| Option | Type | Default | Description |
|
|
| -------------- | -------- | ------- | --------------------------------------------------------------------- |
|
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
|
|
|
## Commands
|
|
| Command | Parameters | Description |
|
|
| ---------- | ---------- | --------------------- |
|
|
| bulletList | — | Toggle a bullet list. |
|
|
|
|
## Keyboard shortcuts
|
|
* Windows/Linux: `Control` `Shift` `8`
|
|
* macOS: `Cmd` `Shift` `8`
|
|
|
|
## Source code
|
|
[packages/extension-bullet-list/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-bullet-list/)
|
|
|
|
## Usage
|
|
<tiptap-demo name="Nodes/BulletList"></tiptap-demo>
|