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,50 @@
import { Command, createNode } from '@tiptap/core'
import { wrappingInputRule } from 'prosemirror-inputrules'
export const inputRegex = /^\s*([-+*])\s$/
const BulletList = createNode({
name: 'bulletList',
group: 'block list',
content: 'listItem+',
parseHTML() {
return [
{ tag: 'ul' },
]
},
renderHTML({ attributes }) {
return ['ul', attributes, 0]
},
addCommands() {
return {
bulletList: (): Command => ({ commands }) => {
return commands.toggleList('bulletList', 'listItem')
},
}
},
addKeyboardShortcuts() {
return {
'Shift-Control-8': () => this.editor.bulletList(),
}
},
addInputRules() {
return [
wrappingInputRule(inputRegex, this.type),
]
},
})
export default BulletList
declare module '@tiptap/core/src/Editor' {
interface AllExtensions {
BulletList: typeof BulletList,
}
}