Socket
Socket
Sign inDemoInstall

@tiptap/extension-task-item

Package Overview
Dependencies
Maintainers
4
Versions
171
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-task-item - npm Package Compare versions

Comparing version 2.3.2 to 2.4.0

7

dist/index.js
import { Node, mergeAttributes, wrappingInputRule } from '@tiptap/core';
/**
* Matches a task item to a - [ ] on input.
*/
const inputRegex = /^\s*(\[([( |x])?\])\s$/;
/**
* This extension allows you to create task items.
* @see https://www.tiptap.dev/api/nodes/task-item
*/
const TaskItem = Node.create({

@@ -5,0 +12,0 @@ name: 'taskItem',

@@ -7,3 +7,10 @@ (function (global, factory) {

/**
* Matches a task item to a - [ ] on input.
*/
const inputRegex = /^\s*(\[([( |x])?\])\s$/;
/**
* This extension allows you to create task items.
* @see https://www.tiptap.dev/api/nodes/task-item
*/
const TaskItem = core.Node.create({

@@ -10,0 +17,0 @@ name: 'taskItem',

import { Node } from '@tiptap/core';
import { Node as ProseMirrorNode } from '@tiptap/pm/model';
export interface TaskItemOptions {
/**
* A callback function that is called when the checkbox is clicked while the editor is in readonly mode.
* @param node The prosemirror node of the task item
* @param checked The new checked state
* @returns boolean
*/
onReadOnlyChecked?: (node: ProseMirrorNode, checked: boolean) => boolean;
/**
* Controls whether the task items can be nested or not.
* @default false
* @example true
*/
nested: boolean;
/**
* HTML attributes to add to the task item element.
* @default {}
* @example { class: 'foo' }
*/
HTMLAttributes: Record<string, any>;
/**
* The node type for taskList nodes
* @default 'taskList'
* @example 'myCustomTaskList'
*/
taskListTypeName: string;
}
/**
* Matches a task item to a - [ ] on input.
*/
export declare const inputRegex: RegExp;
/**
* This extension allows you to create task items.
* @see https://www.tiptap.dev/api/nodes/task-item
*/
export declare const TaskItem: Node<TaskItemOptions, any>;

6

package.json
{
"name": "@tiptap/extension-task-item",
"description": "task item extension for tiptap",
"version": "2.3.2",
"version": "2.4.0",
"homepage": "https://tiptap.dev",

@@ -32,4 +32,4 @@ "keywords": [

"devDependencies": {
"@tiptap/core": "^2.3.2",
"@tiptap/pm": "^2.3.2"
"@tiptap/core": "^2.4.0",
"@tiptap/pm": "^2.4.0"
},

@@ -36,0 +36,0 @@ "peerDependencies": {

@@ -7,10 +7,41 @@ import {

export interface TaskItemOptions {
/**
* A callback function that is called when the checkbox is clicked while the editor is in readonly mode.
* @param node The prosemirror node of the task item
* @param checked The new checked state
* @returns boolean
*/
onReadOnlyChecked?: (node: ProseMirrorNode, checked: boolean) => boolean
/**
* Controls whether the task items can be nested or not.
* @default false
* @example true
*/
nested: boolean
/**
* HTML attributes to add to the task item element.
* @default {}
* @example { class: 'foo' }
*/
HTMLAttributes: Record<string, any>
/**
* The node type for taskList nodes
* @default 'taskList'
* @example 'myCustomTaskList'
*/
taskListTypeName: string
}
/**
* Matches a task item to a - [ ] on input.
*/
export const inputRegex = /^\s*(\[([( |x])?\])\s$/
/**
* This extension allows you to create task items.
* @see https://www.tiptap.dev/api/nodes/task-item
*/
export const TaskItem = Node.create<TaskItemOptions>({

@@ -17,0 +48,0 @@ name: 'taskItem',

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc