add basic bullet list
This commit is contained in:
19
packages/extension-list-item/index.ts
Normal file
19
packages/extension-list-item/index.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Node } from '@tiptap/core'
|
||||
|
||||
export default new Node()
|
||||
.name('list_item')
|
||||
.schema(() => ({
|
||||
content: 'paragraph block*',
|
||||
defining: true,
|
||||
draggable: false,
|
||||
parseDOM: [
|
||||
{ tag: 'li' },
|
||||
],
|
||||
toDOM: () => ['li', 0],
|
||||
}))
|
||||
.keys(({ editor, name }) => ({
|
||||
// Enter: () => editor.splitListItem(name),
|
||||
// Tab: () => editor.sinkListItem(name),
|
||||
// 'Shift-Tab': () => editor.liftListItem(name),
|
||||
}))
|
||||
.create()
|
||||
Reference in New Issue
Block a user