@tiptap/extension-ordered-list
Advanced tools
Comparing version 2.0.0-beta.25 to 2.0.0-beta.26
import { Node } from '@tiptap/core'; | ||
export interface OrderedListOptions { | ||
itemTypeName: string; | ||
HTMLAttributes: Record<string, any>; | ||
@@ -4,0 +5,0 @@ } |
@@ -12,2 +12,3 @@ 'use strict'; | ||
return { | ||
itemTypeName: 'listItem', | ||
HTMLAttributes: {}, | ||
@@ -17,3 +18,5 @@ }; | ||
group: 'block list', | ||
content: 'listItem+', | ||
content() { | ||
return `${this.options.itemTypeName}+`; | ||
}, | ||
addAttributes() { | ||
@@ -47,3 +50,3 @@ return { | ||
toggleOrderedList: () => ({ commands }) => { | ||
return commands.toggleList(this.name, 'listItem'); | ||
return commands.toggleList(this.name, this.options.itemTypeName); | ||
}, | ||
@@ -50,0 +53,0 @@ }; |
@@ -8,2 +8,3 @@ import { Node, mergeAttributes, wrappingInputRule } from '@tiptap/core'; | ||
return { | ||
itemTypeName: 'listItem', | ||
HTMLAttributes: {}, | ||
@@ -13,3 +14,5 @@ }; | ||
group: 'block list', | ||
content: 'listItem+', | ||
content() { | ||
return `${this.options.itemTypeName}+`; | ||
}, | ||
addAttributes() { | ||
@@ -43,3 +46,3 @@ return { | ||
toggleOrderedList: () => ({ commands }) => { | ||
return commands.toggleList(this.name, 'listItem'); | ||
return commands.toggleList(this.name, this.options.itemTypeName); | ||
}, | ||
@@ -46,0 +49,0 @@ }; |
@@ -12,2 +12,3 @@ (function (global, factory) { | ||
return { | ||
itemTypeName: 'listItem', | ||
HTMLAttributes: {}, | ||
@@ -17,3 +18,5 @@ }; | ||
group: 'block list', | ||
content: 'listItem+', | ||
content() { | ||
return `${this.options.itemTypeName}+`; | ||
}, | ||
addAttributes() { | ||
@@ -47,3 +50,3 @@ return { | ||
toggleOrderedList: () => ({ commands }) => { | ||
return commands.toggleList(this.name, 'listItem'); | ||
return commands.toggleList(this.name, this.options.itemTypeName); | ||
}, | ||
@@ -50,0 +53,0 @@ }; |
{ | ||
"name": "@tiptap/extension-ordered-list", | ||
"description": "ordered list extension for tiptap", | ||
"version": "2.0.0-beta.25", | ||
"version": "2.0.0-beta.26", | ||
"homepage": "https://tiptap.dev", | ||
@@ -31,3 +31,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "270543995c92243fc27c4a688af6a93033fb4b7e" | ||
"gitHead": "20876f7481f1a574541471b8f4b3be829deea574" | ||
} |
import { Node, mergeAttributes, wrappingInputRule } from '@tiptap/core' | ||
export interface OrderedListOptions { | ||
itemTypeName: string, | ||
HTMLAttributes: Record<string, any>, | ||
@@ -25,2 +26,3 @@ } | ||
return { | ||
itemTypeName: 'listItem', | ||
HTMLAttributes: {}, | ||
@@ -32,3 +34,5 @@ } | ||
content: 'listItem+', | ||
content() { | ||
return `${this.options.itemTypeName}+` | ||
}, | ||
@@ -67,3 +71,3 @@ addAttributes() { | ||
toggleOrderedList: () => ({ commands }) => { | ||
return commands.toggleList(this.name, 'listItem') | ||
return commands.toggleList(this.name, this.options.itemTypeName) | ||
}, | ||
@@ -70,0 +74,0 @@ } |
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
23253
303