mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-15 11:09:01 +08:00
use splitToDefaultListItem again in todo_item
splitToDefaultListItem didn't worked before with nested todos because of a missing import statement
This commit is contained in:
parent
f81f07ad65
commit
1332a24ad6
@ -1,5 +1,5 @@
|
|||||||
import { Node } from 'tiptap'
|
import { Node } from 'tiptap'
|
||||||
import { sinkListItem, splitListItem, liftListItem } from 'tiptap-commands'
|
import { sinkListItem, splitToDefaultListItem, liftListItem } from 'tiptap-commands'
|
||||||
|
|
||||||
export default class TodoItem extends Node {
|
export default class TodoItem extends Node {
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ export default class TodoItem extends Node {
|
|||||||
|
|
||||||
keys({ type }) {
|
keys({ type }) {
|
||||||
return {
|
return {
|
||||||
Enter: splitListItem(type),
|
Enter: splitToDefaultListItem(type),
|
||||||
Tab: this.options.nested ? sinkListItem(type) : () => {},
|
Tab: this.options.nested ? sinkListItem(type) : () => {},
|
||||||
'Shift-Tab': liftListItem(type),
|
'Shift-Tab': liftListItem(type),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user