@tiptap/extension-task-list
Advanced tools
Comparing version 2.3.2 to 2.4.0
import { Node, mergeAttributes } from '@tiptap/core'; | ||
/** | ||
* This extension allows you to create task lists. | ||
* @see https://www.tiptap.dev/api/nodes/task-list | ||
*/ | ||
const TaskList = Node.create({ | ||
@@ -4,0 +8,0 @@ name: 'taskList', |
@@ -7,2 +7,6 @@ (function (global, factory) { | ||
/** | ||
* This extension allows you to create task lists. | ||
* @see https://www.tiptap.dev/api/nodes/task-list | ||
*/ | ||
const TaskList = core.Node.create({ | ||
@@ -9,0 +13,0 @@ name: 'taskList', |
import { Node } from '@tiptap/core'; | ||
export interface TaskListOptions { | ||
/** | ||
* The node type name for a task item. | ||
* @default 'taskItem' | ||
* @example 'myCustomTaskItem' | ||
*/ | ||
itemTypeName: string; | ||
/** | ||
* The HTML attributes for a task list node. | ||
* @default {} | ||
* @example { class: 'foo' } | ||
*/ | ||
HTMLAttributes: Record<string, any>; | ||
@@ -11,2 +21,3 @@ } | ||
* Toggle a task list | ||
* @example editor.commands.toggleTaskList() | ||
*/ | ||
@@ -17,2 +28,6 @@ toggleTaskList: () => ReturnType; | ||
} | ||
/** | ||
* This extension allows you to create task lists. | ||
* @see https://www.tiptap.dev/api/nodes/task-list | ||
*/ | ||
export declare const TaskList: Node<TaskListOptions, any>; |
{ | ||
"name": "@tiptap/extension-task-list", | ||
"description": "task list extension for tiptap", | ||
"version": "2.3.2", | ||
"version": "2.4.0", | ||
"homepage": "https://tiptap.dev", | ||
@@ -32,3 +32,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@tiptap/core": "^2.3.2" | ||
"@tiptap/core": "^2.4.0" | ||
}, | ||
@@ -35,0 +35,0 @@ "peerDependencies": { |
import { mergeAttributes, Node } from '@tiptap/core' | ||
export interface TaskListOptions { | ||
/** | ||
* The node type name for a task item. | ||
* @default 'taskItem' | ||
* @example 'myCustomTaskItem' | ||
*/ | ||
itemTypeName: string, | ||
/** | ||
* The HTML attributes for a task list node. | ||
* @default {} | ||
* @example { class: 'foo' } | ||
*/ | ||
HTMLAttributes: Record<string, any>, | ||
@@ -13,2 +24,3 @@ } | ||
* Toggle a task list | ||
* @example editor.commands.toggleTaskList() | ||
*/ | ||
@@ -20,2 +32,6 @@ toggleTaskList: () => ReturnType, | ||
/** | ||
* This extension allows you to create task lists. | ||
* @see https://www.tiptap.dev/api/nodes/task-list | ||
*/ | ||
export const TaskList = Node.create<TaskListOptions>({ | ||
@@ -22,0 +38,0 @@ name: 'taskList', |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
17087
242