Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tiptap/extension-ordered-list

Package Overview
Dependencies
Maintainers
4
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-ordered-list - npm Package Compare versions

Comparing version 2.3.2 to 2.4.0

18

dist/index.js
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 an ordered list to a 1. on input (or any number followed by a dot).
*/
const inputRegex = /^(\d+)\.\s$/;
/**
* This extension allows you to create ordered lists.
* This requires the ListItem extension
* @see https://www.tiptap.dev/api/nodes/ordered-list
* @see https://www.tiptap.dev/api/nodes/list-item
*/
const OrderedList = Node.create({

@@ -75,0 +93,0 @@ name: 'orderedList',

@@ -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 an ordered list to a 1. on input (or any number followed by a dot).
*/
const inputRegex = /^(\d+)\.\s$/;
/**
* This extension allows you to create ordered lists.
* This requires the ListItem extension
* @see https://www.tiptap.dev/api/nodes/ordered-list
* @see https://www.tiptap.dev/api/nodes/list-item
*/
const OrderedList = core.Node.create({

@@ -80,0 +98,0 @@ name: 'orderedList',

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 { Node } from '@tiptap/core';
export interface OrderedListOptions {
/**
* The node type name for list items.
* @default 'listItem'
* @example 'myListItem'
*/
itemTypeName: string;
/**
* The HTML attributes for an ordered list node.
* @default {}
* @example { class: 'foo' }
*/
HTMLAttributes: Record<string, any>;
/**
* Keep the marks when splitting a list item.
* @default false
* @example true
*/
keepMarks: boolean;
/**
* Keep the attributes when splitting a list item.
* @default false
* @example true
*/
keepAttributes: boolean;

@@ -13,2 +33,3 @@ }

* Toggle an ordered list
* @example editor.commands.toggleOrderedList()
*/

@@ -19,3 +40,12 @@ toggleOrderedList: () => ReturnType;

}
/**
* Matches an ordered list to a 1. on input (or any number followed by a dot).
*/
export declare const inputRegex: RegExp;
/**
* This extension allows you to create ordered lists.
* This requires the ListItem extension
* @see https://www.tiptap.dev/api/nodes/ordered-list
* @see https://www.tiptap.dev/api/nodes/list-item
*/
export declare const OrderedList: Node<OrderedListOptions, 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>;

4

package.json
{
"name": "@tiptap/extension-ordered-list",
"description": "ordered 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 OrderedListOptions {
/**
* The node type name for list items.
* @default 'listItem'
* @example 'myListItem'
*/
itemTypeName: string,
/**
* The HTML attributes for an ordered list node.
* @default {}
* @example { class: 'foo' }
*/
HTMLAttributes: Record<string, any>,
/**
* Keep the marks when splitting a list item.
* @default false
* @example true
*/
keepMarks: boolean,
/**
* Keep the attributes when splitting a list item.
* @default false
* @example true
*/
keepAttributes: boolean,

@@ -19,2 +42,3 @@ }

* Toggle an ordered list
* @example editor.commands.toggleOrderedList()
*/

@@ -26,4 +50,13 @@ toggleOrderedList: () => ReturnType,

/**
* Matches an ordered list to a 1. on input (or any number followed by a dot).
*/
export const inputRegex = /^(\d+)\.\s$/
/**
* This extension allows you to create ordered lists.
* This requires the ListItem extension
* @see https://www.tiptap.dev/api/nodes/ordered-list
* @see https://www.tiptap.dev/api/nodes/list-item
*/
export const OrderedList = Node.create<OrderedListOptions>({

@@ -30,0 +63,0 @@ name: 'orderedList',

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