@tiptap/extension-list 3.24.0 → 3.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,8 @@ import {
8
8
  } from '@tiptap/core'
9
9
  import type { Node as ProseMirrorNode } from '@tiptap/pm/model'
10
10
 
11
+ import { createBranchingListDeleteKeymap } from '../helpers/createBranchingListDeleteKeymap.js'
12
+
11
13
  export interface TaskItemOptions {
12
14
  /**
13
15
  * A callback function that is called when the checkbox is clicked while the editor is in readonly mode.
@@ -158,6 +160,14 @@ export const TaskItem = Node.create<TaskItemOptions>({
158
160
  return renderNestedMarkdownContent(node, h, prefix)
159
161
  },
160
162
 
163
+ addExtensions() {
164
+ if (!this.options.nested) {
165
+ return []
166
+ }
167
+
168
+ return [createBranchingListDeleteKeymap(this.name, [this.options.taskListTypeName])]
169
+ },
170
+
161
171
  addKeyboardShortcuts() {
162
172
  const shortcuts: {
163
173
  [key: string]: KeyboardShortcutCommand