move inputrule from task_list to task_item
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user