fix more commands

This commit is contained in:
Philipp Kühn
2020-09-22 09:08:08 +02:00
parent 655d721914
commit dcac67c61a
25 changed files with 167 additions and 182 deletions

View File

@@ -1,9 +1,11 @@
import { Node } from '@tiptap/core'
import { Command, Node } from '@tiptap/core'
import { wrappingInputRule } from 'prosemirror-inputrules'
export type BulletListCommand = () => Command
declare module '@tiptap/core/src/Editor' {
interface Editor {
bulletList(): Editor,
bulletList: BulletListCommand,
}
}
@@ -18,9 +20,8 @@ export default new Node()
toDOM: () => ['ul', 0],
}))
// .commands(({ editor, type }) => ({
// [name]: next => attrs => {
// // editor.toggleList(type, editor.schema.nodes.list_item)
// next()
// bulletList: () => ({ commands }) => {
// return commands.toggleList(type, editor.schema.nodes.list_item)
// },
// }))
.keys(({ editor }) => ({