fix build for now

This commit is contained in:
Philipp Kühn
2020-11-10 16:29:31 +01:00
parent 960368db0e
commit d3b4e7a1d4
77 changed files with 28 additions and 64 deletions

View File

@@ -0,0 +1,37 @@
import { createNode } from '@tiptap/core'
const ListItem = createNode({
name: 'listItem',
content: '(paragraph|list?)+',
defining: true,
parseHTML() {
return [
{
tag: 'li',
},
]
},
renderHTML({ attributes }) {
return ['li', attributes, 0]
},
addKeyboardShortcuts() {
return {
Enter: () => this.editor.splitListItem('listItem'),
Tab: () => this.editor.sinkListItem('listItem'),
'Shift-Tab': () => this.editor.liftListItem('listItem'),
}
},
})
export default ListItem
declare module '@tiptap/core/src/Editor' {
interface AllExtensions {
ListItem: typeof ListItem,
}
}