@tiptap/extension-bullet-list
Advanced tools
Comparing version 2.3.2 to 2.4.0
import { Node, mergeAttributes, Mark, getMarkAttributes, wrappingInputRule } from '@tiptap/core'; | ||
/** | ||
* This extension allows you to create list items. | ||
* @see https://www.tiptap.dev/api/nodes/list-item | ||
*/ | ||
const ListItem = Node.create({ | ||
@@ -33,2 +37,7 @@ name: 'listItem', | ||
/** | ||
* This extension allows you to create text styles. It is required by default | ||
* for the `textColor` and `backgroundColor` extensions. | ||
* @see https://www.tiptap.dev/api/marks/text-style | ||
*/ | ||
const TextStyle = Mark.create({ | ||
@@ -72,3 +81,12 @@ name: 'textStyle', | ||
/** | ||
* Matches a bullet list to a dash or asterisk. | ||
*/ | ||
const inputRegex = /^\s*([-+*])\s$/; | ||
/** | ||
* This extension allows you to create bullet lists. | ||
* This requires the ListItem extension | ||
* @see https://tiptap.dev/api/nodes/bullet-list | ||
* @see https://tiptap.dev/api/nodes/list-item. | ||
*/ | ||
const BulletList = Node.create({ | ||
@@ -75,0 +93,0 @@ name: 'bulletList', |
@@ -7,2 +7,6 @@ (function (global, factory) { | ||
/** | ||
* This extension allows you to create list items. | ||
* @see https://www.tiptap.dev/api/nodes/list-item | ||
*/ | ||
const ListItem = core.Node.create({ | ||
@@ -38,2 +42,7 @@ name: 'listItem', | ||
/** | ||
* This extension allows you to create text styles. It is required by default | ||
* for the `textColor` and `backgroundColor` extensions. | ||
* @see https://www.tiptap.dev/api/marks/text-style | ||
*/ | ||
const TextStyle = core.Mark.create({ | ||
@@ -77,3 +86,12 @@ name: 'textStyle', | ||
/** | ||
* Matches a bullet list to a dash or asterisk. | ||
*/ | ||
const inputRegex = /^\s*([-+*])\s$/; | ||
/** | ||
* This extension allows you to create bullet lists. | ||
* This requires the ListItem extension | ||
* @see https://tiptap.dev/api/nodes/bullet-list | ||
* @see https://tiptap.dev/api/nodes/list-item. | ||
*/ | ||
const BulletList = core.Node.create({ | ||
@@ -80,0 +98,0 @@ name: 'bulletList', |
import { Node } from '@tiptap/core'; | ||
export interface BulletListOptions { | ||
/** | ||
* The node name for the list items | ||
* @default 'listItem' | ||
* @example 'paragraph' | ||
*/ | ||
itemTypeName: string; | ||
/** | ||
* HTML attributes to add to the bullet list element | ||
* @default {} | ||
* @example { class: 'foo' } | ||
*/ | ||
HTMLAttributes: Record<string, any>; | ||
/** | ||
* Keep the marks when splitting the list | ||
* @default false | ||
* @example true | ||
*/ | ||
keepMarks: boolean; | ||
/** | ||
* Keep the attributes when splitting the list | ||
* @default false | ||
* @example true | ||
*/ | ||
keepAttributes: boolean; | ||
@@ -18,3 +38,12 @@ } | ||
} | ||
/** | ||
* Matches a bullet list to a dash or asterisk. | ||
*/ | ||
export declare const inputRegex: RegExp; | ||
/** | ||
* This extension allows you to create bullet lists. | ||
* This requires the ListItem extension | ||
* @see https://tiptap.dev/api/nodes/bullet-list | ||
* @see https://tiptap.dev/api/nodes/list-item. | ||
*/ | ||
export declare const BulletList: Node<BulletListOptions, any>; |
import { Node } from '@tiptap/core'; | ||
export interface ListItemOptions { | ||
/** | ||
* The HTML attributes for a list item node. | ||
* @default {} | ||
* @example { class: 'foo' } | ||
*/ | ||
HTMLAttributes: Record<string, any>; | ||
/** | ||
* The node type for bulletList nodes | ||
* @default 'bulletList' | ||
* @example 'myCustomBulletList' | ||
*/ | ||
bulletListTypeName: string; | ||
/** | ||
* The node type for orderedList nodes | ||
* @default 'orderedList' | ||
* @example 'myCustomOrderedList' | ||
*/ | ||
orderedListTypeName: string; | ||
} | ||
/** | ||
* This extension allows you to create list items. | ||
* @see https://www.tiptap.dev/api/nodes/list-item | ||
*/ | ||
export declare const ListItem: Node<ListItemOptions, any>; |
import { Mark } from '@tiptap/core'; | ||
export interface TextStyleOptions { | ||
/** | ||
* HTML attributes to add to the span element. | ||
* @default {} | ||
* @example { class: 'foo' } | ||
*/ | ||
HTMLAttributes: Record<string, any>; | ||
@@ -10,2 +15,3 @@ } | ||
* Remove spans without inline style attributes. | ||
* @example editor.commands.removeEmptyTextStyle() | ||
*/ | ||
@@ -16,2 +22,7 @@ removeEmptyTextStyle: () => ReturnType; | ||
} | ||
/** | ||
* This extension allows you to create text styles. It is required by default | ||
* for the `textColor` and `backgroundColor` extensions. | ||
* @see https://www.tiptap.dev/api/marks/text-style | ||
*/ | ||
export declare const TextStyle: Mark<TextStyleOptions, any>; |
{ | ||
"name": "@tiptap/extension-bullet-list", | ||
"description": "bullet 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": { |
@@ -7,5 +7,28 @@ import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core' | ||
export interface BulletListOptions { | ||
/** | ||
* The node name for the list items | ||
* @default 'listItem' | ||
* @example 'paragraph' | ||
*/ | ||
itemTypeName: string, | ||
/** | ||
* HTML attributes to add to the bullet list element | ||
* @default {} | ||
* @example { class: 'foo' } | ||
*/ | ||
HTMLAttributes: Record<string, any>, | ||
/** | ||
* Keep the marks when splitting the list | ||
* @default false | ||
* @example true | ||
*/ | ||
keepMarks: boolean, | ||
/** | ||
* Keep the attributes when splitting the list | ||
* @default false | ||
* @example true | ||
*/ | ||
keepAttributes: boolean, | ||
@@ -25,4 +48,13 @@ } | ||
/** | ||
* Matches a bullet list to a dash or asterisk. | ||
*/ | ||
export const inputRegex = /^\s*([-+*])\s$/ | ||
/** | ||
* This extension allows you to create bullet lists. | ||
* This requires the ListItem extension | ||
* @see https://tiptap.dev/api/nodes/bullet-list | ||
* @see https://tiptap.dev/api/nodes/list-item. | ||
*/ | ||
export const BulletList = Node.create<BulletListOptions>({ | ||
@@ -29,0 +61,0 @@ name: 'bulletList', |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53137
665