move inputrule from task_list to task_item

This commit is contained in:
Philipp Kühn
2020-10-30 16:51:25 +01:00
parent 9dabdfe288
commit a8216d0840
2 changed files with 15 additions and 10 deletions

View File

@@ -1,8 +1,4 @@
import { Command, createNode, mergeAttributes } from '@tiptap/core'
import { wrappingInputRule } from 'prosemirror-inputrules'
// TODO: add suport for [ ] and [x]
export const inputRegex = /^\s*(\[ \])\s$/
const TaskList = createNode({
name: 'task_list',
@@ -33,12 +29,6 @@ const TaskList = createNode({
},
}
},
addInputRules() {
return [
wrappingInputRule(inputRegex, this.type),
]
},
})
export default TaskList