@tiptap/starter-kit 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/README.md +5 -1
- package/dist/index.cjs +123 -91
- package/dist/index.cjs.map +1 -1
- package/dist/{packages/starter-kit/src/starter-kit.d.ts → index.d.cts} +32 -10
- package/dist/index.d.ts +136 -0
- package/dist/index.js +98 -88
- package/dist/index.js.map +1 -1
- package/package.json +33 -26
- package/src/starter-kit.ts +107 -55
- package/dist/index.umd.js +0 -81
- package/dist/index.umd.js.map +0 -1
- package/dist/packages/core/src/CommandManager.d.ts +0 -20
- package/dist/packages/core/src/Editor.d.ts +0 -161
- package/dist/packages/core/src/EventEmitter.d.ts +0 -11
- package/dist/packages/core/src/Extension.d.ts +0 -343
- package/dist/packages/core/src/ExtensionManager.d.ts +0 -55
- package/dist/packages/core/src/InputRule.d.ts +0 -42
- package/dist/packages/core/src/Mark.d.ts +0 -451
- package/dist/packages/core/src/Node.d.ts +0 -611
- package/dist/packages/core/src/NodePos.d.ts +0 -44
- package/dist/packages/core/src/NodeView.d.ts +0 -31
- package/dist/packages/core/src/PasteRule.d.ts +0 -50
- package/dist/packages/core/src/Tracker.d.ts +0 -11
- package/dist/packages/core/src/commands/blur.d.ts +0 -13
- package/dist/packages/core/src/commands/clearContent.d.ts +0 -14
- package/dist/packages/core/src/commands/clearNodes.d.ts +0 -13
- package/dist/packages/core/src/commands/command.d.ts +0 -18
- package/dist/packages/core/src/commands/createParagraphNear.d.ts +0 -13
- package/dist/packages/core/src/commands/cut.d.ts +0 -20
- package/dist/packages/core/src/commands/deleteCurrentNode.d.ts +0 -13
- package/dist/packages/core/src/commands/deleteNode.d.ts +0 -15
- package/dist/packages/core/src/commands/deleteRange.d.ts +0 -14
- package/dist/packages/core/src/commands/deleteSelection.d.ts +0 -13
- package/dist/packages/core/src/commands/enter.d.ts +0 -13
- package/dist/packages/core/src/commands/exitCode.d.ts +0 -13
- package/dist/packages/core/src/commands/extendMarkRange.d.ts +0 -25
- package/dist/packages/core/src/commands/first.d.ts +0 -14
- package/dist/packages/core/src/commands/focus.d.ts +0 -27
- package/dist/packages/core/src/commands/forEach.d.ts +0 -14
- package/dist/packages/core/src/commands/index.d.ts +0 -55
- package/dist/packages/core/src/commands/insertContent.d.ts +0 -34
- package/dist/packages/core/src/commands/insertContentAt.d.ts +0 -47
- package/dist/packages/core/src/commands/join.d.ts +0 -41
- package/dist/packages/core/src/commands/joinItemBackward.d.ts +0 -13
- package/dist/packages/core/src/commands/joinItemForward.d.ts +0 -13
- package/dist/packages/core/src/commands/joinTextblockBackward.d.ts +0 -12
- package/dist/packages/core/src/commands/joinTextblockForward.d.ts +0 -12
- package/dist/packages/core/src/commands/keyboardShortcut.d.ts +0 -14
- package/dist/packages/core/src/commands/lift.d.ts +0 -17
- package/dist/packages/core/src/commands/liftEmptyBlock.d.ts +0 -13
- package/dist/packages/core/src/commands/liftListItem.d.ts +0 -15
- package/dist/packages/core/src/commands/newlineInCode.d.ts +0 -13
- package/dist/packages/core/src/commands/resetAttributes.d.ts +0 -16
- package/dist/packages/core/src/commands/scrollIntoView.d.ts +0 -13
- package/dist/packages/core/src/commands/selectAll.d.ts +0 -13
- package/dist/packages/core/src/commands/selectNodeBackward.d.ts +0 -13
- package/dist/packages/core/src/commands/selectNodeForward.d.ts +0 -13
- package/dist/packages/core/src/commands/selectParentNode.d.ts +0 -13
- package/dist/packages/core/src/commands/selectTextblockEnd.d.ts +0 -13
- package/dist/packages/core/src/commands/selectTextblockStart.d.ts +0 -13
- package/dist/packages/core/src/commands/setContent.d.ts +0 -40
- package/dist/packages/core/src/commands/setMark.d.ts +0 -15
- package/dist/packages/core/src/commands/setMeta.d.ts +0 -15
- package/dist/packages/core/src/commands/setNode.d.ts +0 -16
- package/dist/packages/core/src/commands/setNodeSelection.d.ts +0 -14
- package/dist/packages/core/src/commands/setTextSelection.d.ts +0 -14
- package/dist/packages/core/src/commands/sinkListItem.d.ts +0 -15
- package/dist/packages/core/src/commands/splitBlock.d.ts +0 -17
- package/dist/packages/core/src/commands/splitListItem.d.ts +0 -15
- package/dist/packages/core/src/commands/toggleList.d.ts +0 -18
- package/dist/packages/core/src/commands/toggleMark.d.ts +0 -30
- package/dist/packages/core/src/commands/toggleNode.d.ts +0 -17
- package/dist/packages/core/src/commands/toggleWrap.d.ts +0 -16
- package/dist/packages/core/src/commands/undoInputRule.d.ts +0 -13
- package/dist/packages/core/src/commands/unsetAllMarks.d.ts +0 -13
- package/dist/packages/core/src/commands/unsetMark.d.ts +0 -25
- package/dist/packages/core/src/commands/updateAttributes.d.ts +0 -24
- package/dist/packages/core/src/commands/wrapIn.d.ts +0 -16
- package/dist/packages/core/src/commands/wrapInList.d.ts +0 -16
- package/dist/packages/core/src/extensions/clipboardTextSerializer.d.ts +0 -5
- package/dist/packages/core/src/extensions/commands.d.ts +0 -3
- package/dist/packages/core/src/extensions/editable.d.ts +0 -2
- package/dist/packages/core/src/extensions/focusEvents.d.ts +0 -2
- package/dist/packages/core/src/extensions/index.d.ts +0 -6
- package/dist/packages/core/src/extensions/keymap.d.ts +0 -2
- package/dist/packages/core/src/extensions/tabindex.d.ts +0 -2
- package/dist/packages/core/src/helpers/combineTransactionSteps.d.ts +0 -10
- package/dist/packages/core/src/helpers/createChainableState.d.ts +0 -10
- package/dist/packages/core/src/helpers/createDocument.d.ts +0 -12
- package/dist/packages/core/src/helpers/createNodeFromContent.d.ts +0 -15
- package/dist/packages/core/src/helpers/defaultBlockAt.d.ts +0 -7
- package/dist/packages/core/src/helpers/findChildren.d.ts +0 -9
- package/dist/packages/core/src/helpers/findChildrenInRange.d.ts +0 -10
- package/dist/packages/core/src/helpers/findParentNode.d.ts +0 -16
- package/dist/packages/core/src/helpers/findParentNodeClosestToPos.d.ts +0 -17
- package/dist/packages/core/src/helpers/generateHTML.d.ts +0 -8
- package/dist/packages/core/src/helpers/generateJSON.d.ts +0 -8
- package/dist/packages/core/src/helpers/generateText.d.ts +0 -12
- package/dist/packages/core/src/helpers/getAttributes.d.ts +0 -9
- package/dist/packages/core/src/helpers/getAttributesFromExtensions.d.ts +0 -6
- package/dist/packages/core/src/helpers/getChangedRanges.d.ts +0 -11
- package/dist/packages/core/src/helpers/getDebugJSON.d.ts +0 -8
- package/dist/packages/core/src/helpers/getExtensionField.d.ts +0 -9
- package/dist/packages/core/src/helpers/getHTMLFromFragment.d.ts +0 -2
- package/dist/packages/core/src/helpers/getMarkAttributes.d.ts +0 -3
- package/dist/packages/core/src/helpers/getMarkRange.d.ts +0 -3
- package/dist/packages/core/src/helpers/getMarkType.d.ts +0 -2
- package/dist/packages/core/src/helpers/getMarksBetween.d.ts +0 -3
- package/dist/packages/core/src/helpers/getNodeAtPosition.d.ts +0 -11
- package/dist/packages/core/src/helpers/getNodeAttributes.d.ts +0 -3
- package/dist/packages/core/src/helpers/getNodeType.d.ts +0 -2
- package/dist/packages/core/src/helpers/getRenderedAttributes.d.ts +0 -3
- package/dist/packages/core/src/helpers/getSchema.d.ts +0 -4
- package/dist/packages/core/src/helpers/getSchemaByResolvedExtensions.d.ts +0 -10
- package/dist/packages/core/src/helpers/getSchemaTypeByName.d.ts +0 -8
- package/dist/packages/core/src/helpers/getSchemaTypeNameByName.d.ts +0 -8
- package/dist/packages/core/src/helpers/getSplittedAttributes.d.ts +0 -9
- package/dist/packages/core/src/helpers/getText.d.ts +0 -15
- package/dist/packages/core/src/helpers/getTextBetween.d.ts +0 -14
- package/dist/packages/core/src/helpers/getTextContentFromNodes.d.ts +0 -8
- package/dist/packages/core/src/helpers/getTextSerializersFromSchema.d.ts +0 -8
- package/dist/packages/core/src/helpers/index.d.ts +0 -50
- package/dist/packages/core/src/helpers/injectExtensionAttributesToParseRule.d.ts +0 -9
- package/dist/packages/core/src/helpers/isActive.d.ts +0 -2
- package/dist/packages/core/src/helpers/isAtEndOfNode.d.ts +0 -2
- package/dist/packages/core/src/helpers/isAtStartOfNode.d.ts +0 -2
- package/dist/packages/core/src/helpers/isExtensionRulesEnabled.d.ts +0 -2
- package/dist/packages/core/src/helpers/isList.d.ts +0 -2
- package/dist/packages/core/src/helpers/isMarkActive.d.ts +0 -3
- package/dist/packages/core/src/helpers/isNodeActive.d.ts +0 -3
- package/dist/packages/core/src/helpers/isNodeEmpty.d.ts +0 -2
- package/dist/packages/core/src/helpers/isNodeSelection.d.ts +0 -2
- package/dist/packages/core/src/helpers/isTextSelection.d.ts +0 -2
- package/dist/packages/core/src/helpers/posToDOMRect.d.ts +0 -2
- package/dist/packages/core/src/helpers/resolveFocusPosition.d.ts +0 -4
- package/dist/packages/core/src/helpers/selectionToInsertionEnd.d.ts +0 -2
- package/dist/packages/core/src/helpers/splitExtensions.d.ts +0 -9
- package/dist/packages/core/src/index.d.ts +0 -24
- package/dist/packages/core/src/inputRules/index.d.ts +0 -5
- package/dist/packages/core/src/inputRules/markInputRule.d.ts +0 -13
- package/dist/packages/core/src/inputRules/nodeInputRule.d.ts +0 -23
- package/dist/packages/core/src/inputRules/textInputRule.d.ts +0 -10
- package/dist/packages/core/src/inputRules/textblockTypeInputRule.d.ts +0 -15
- package/dist/packages/core/src/inputRules/wrappingInputRule.d.ts +0 -28
- package/dist/packages/core/src/pasteRules/index.d.ts +0 -3
- package/dist/packages/core/src/pasteRules/markPasteRule.d.ts +0 -13
- package/dist/packages/core/src/pasteRules/nodePasteRule.d.ts +0 -13
- package/dist/packages/core/src/pasteRules/textPasteRule.d.ts +0 -10
- package/dist/packages/core/src/style.d.ts +0 -1
- package/dist/packages/core/src/types.d.ts +0 -255
- package/dist/packages/core/src/utilities/callOrReturn.d.ts +0 -9
- package/dist/packages/core/src/utilities/createStyleTag.d.ts +0 -1
- package/dist/packages/core/src/utilities/deleteProps.d.ts +0 -6
- package/dist/packages/core/src/utilities/elementFromString.d.ts +0 -1
- package/dist/packages/core/src/utilities/escapeForRegEx.d.ts +0 -1
- package/dist/packages/core/src/utilities/findDuplicates.d.ts +0 -1
- package/dist/packages/core/src/utilities/fromString.d.ts +0 -1
- package/dist/packages/core/src/utilities/index.d.ts +0 -20
- package/dist/packages/core/src/utilities/isAndroid.d.ts +0 -1
- package/dist/packages/core/src/utilities/isEmptyObject.d.ts +0 -1
- package/dist/packages/core/src/utilities/isFunction.d.ts +0 -1
- package/dist/packages/core/src/utilities/isMacOS.d.ts +0 -1
- package/dist/packages/core/src/utilities/isNumber.d.ts +0 -1
- package/dist/packages/core/src/utilities/isPlainObject.d.ts +0 -1
- package/dist/packages/core/src/utilities/isRegExp.d.ts +0 -1
- package/dist/packages/core/src/utilities/isString.d.ts +0 -1
- package/dist/packages/core/src/utilities/isiOS.d.ts +0 -1
- package/dist/packages/core/src/utilities/mergeAttributes.d.ts +0 -1
- package/dist/packages/core/src/utilities/mergeDeep.d.ts +0 -1
- package/dist/packages/core/src/utilities/minMax.d.ts +0 -1
- package/dist/packages/core/src/utilities/objectIncludes.d.ts +0 -8
- package/dist/packages/core/src/utilities/removeDuplicates.d.ts +0 -8
- package/dist/packages/extension-blockquote/src/blockquote.d.ts +0 -36
- package/dist/packages/extension-blockquote/src/index.d.ts +0 -3
- package/dist/packages/extension-bold/src/bold.d.ts +0 -48
- package/dist/packages/extension-bold/src/index.d.ts +0 -3
- package/dist/packages/extension-bullet-list/src/bullet-list.d.ts +0 -48
- package/dist/packages/extension-bullet-list/src/index.d.ts +0 -3
- package/dist/packages/extension-code/src/code.d.ts +0 -40
- package/dist/packages/extension-code/src/index.d.ts +0 -3
- package/dist/packages/extension-code-block/src/code-block.d.ts +0 -59
- package/dist/packages/extension-code-block/src/index.d.ts +0 -3
- package/dist/packages/extension-document/src/document.d.ts +0 -6
- package/dist/packages/extension-document/src/index.d.ts +0 -3
- package/dist/packages/extension-dropcursor/src/dropcursor.d.ts +0 -28
- package/dist/packages/extension-dropcursor/src/index.d.ts +0 -3
- package/dist/packages/extension-gapcursor/src/gapcursor.d.ts +0 -22
- package/dist/packages/extension-gapcursor/src/index.d.ts +0 -3
- package/dist/packages/extension-hard-break/src/hard-break.d.ts +0 -31
- package/dist/packages/extension-hard-break/src/index.d.ts +0 -3
- package/dist/packages/extension-heading/src/heading.d.ts +0 -46
- package/dist/packages/extension-heading/src/index.d.ts +0 -3
- package/dist/packages/extension-history/src/history.d.ts +0 -41
- package/dist/packages/extension-history/src/index.d.ts +0 -3
- package/dist/packages/extension-horizontal-rule/src/horizontal-rule.d.ts +0 -25
- package/dist/packages/extension-horizontal-rule/src/index.d.ts +0 -3
- package/dist/packages/extension-italic/src/index.d.ts +0 -3
- package/dist/packages/extension-italic/src/italic.d.ts +0 -51
- package/dist/packages/extension-list-item/src/index.d.ts +0 -3
- package/dist/packages/extension-list-item/src/list-item.d.ts +0 -26
- package/dist/packages/extension-ordered-list/src/index.d.ts +0 -3
- package/dist/packages/extension-ordered-list/src/ordered-list.d.ts +0 -49
- package/dist/packages/extension-paragraph/src/index.d.ts +0 -3
- package/dist/packages/extension-paragraph/src/paragraph.d.ts +0 -25
- package/dist/packages/extension-strike/src/index.d.ts +0 -3
- package/dist/packages/extension-strike/src/strike.d.ts +0 -43
- package/dist/packages/extension-text/src/index.d.ts +0 -3
- package/dist/packages/extension-text/src/text.d.ts +0 -6
- package/dist/packages/extension-text-style/src/index.d.ts +0 -3
- package/dist/packages/extension-text-style/src/text-style.d.ts +0 -26
- package/dist/packages/starter-kit/src/index.d.ts +0 -4
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Extension, ParentConfig } from '@tiptap/core';
|
|
2
|
-
declare module '@tiptap/core' {
|
|
3
|
-
interface NodeConfig<Options, Storage> {
|
|
4
|
-
/**
|
|
5
|
-
* A function to determine whether the gap cursor is allowed at the current position. Must return `true` or `false`.
|
|
6
|
-
* @default null
|
|
7
|
-
*/
|
|
8
|
-
allowGapCursor?: boolean | null | ((this: {
|
|
9
|
-
name: string;
|
|
10
|
-
options: Options;
|
|
11
|
-
storage: Storage;
|
|
12
|
-
parent: ParentConfig<NodeConfig<Options>>['allowGapCursor'];
|
|
13
|
-
}) => boolean | null);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* This extension allows you to add a gap cursor to your editor.
|
|
18
|
-
* A gap cursor is a cursor that appears when you click on a place
|
|
19
|
-
* where no content is present, for example inbetween nodes.
|
|
20
|
-
* @see https://tiptap.dev/api/extensions/gapcursor
|
|
21
|
-
*/
|
|
22
|
-
export declare const Gapcursor: Extension<any, any>;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Node } from '@tiptap/core';
|
|
2
|
-
export interface HardBreakOptions {
|
|
3
|
-
/**
|
|
4
|
-
* Controls if marks should be kept after being split by a hard break.
|
|
5
|
-
* @default true
|
|
6
|
-
* @example false
|
|
7
|
-
*/
|
|
8
|
-
keepMarks: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* HTML attributes to add to the hard break element.
|
|
11
|
-
* @default {}
|
|
12
|
-
* @example { class: 'foo' }
|
|
13
|
-
*/
|
|
14
|
-
HTMLAttributes: Record<string, any>;
|
|
15
|
-
}
|
|
16
|
-
declare module '@tiptap/core' {
|
|
17
|
-
interface Commands<ReturnType> {
|
|
18
|
-
hardBreak: {
|
|
19
|
-
/**
|
|
20
|
-
* Add a hard break
|
|
21
|
-
* @example editor.commands.setHardBreak()
|
|
22
|
-
*/
|
|
23
|
-
setHardBreak: () => ReturnType;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* This extension allows you to insert hard breaks.
|
|
29
|
-
* @see https://www.tiptap.dev/api/nodes/hard-break
|
|
30
|
-
*/
|
|
31
|
-
export declare const HardBreak: Node<HardBreakOptions, any>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Node } from '@tiptap/core';
|
|
2
|
-
/**
|
|
3
|
-
* The heading level options.
|
|
4
|
-
*/
|
|
5
|
-
export type Level = 1 | 2 | 3 | 4 | 5 | 6;
|
|
6
|
-
export interface HeadingOptions {
|
|
7
|
-
/**
|
|
8
|
-
* The available heading levels.
|
|
9
|
-
* @default [1, 2, 3, 4, 5, 6]
|
|
10
|
-
* @example [1, 2, 3]
|
|
11
|
-
*/
|
|
12
|
-
levels: Level[];
|
|
13
|
-
/**
|
|
14
|
-
* The HTML attributes for a heading node.
|
|
15
|
-
* @default {}
|
|
16
|
-
* @example { class: 'foo' }
|
|
17
|
-
*/
|
|
18
|
-
HTMLAttributes: Record<string, any>;
|
|
19
|
-
}
|
|
20
|
-
declare module '@tiptap/core' {
|
|
21
|
-
interface Commands<ReturnType> {
|
|
22
|
-
heading: {
|
|
23
|
-
/**
|
|
24
|
-
* Set a heading node
|
|
25
|
-
* @param attributes The heading attributes
|
|
26
|
-
* @example editor.commands.setHeading({ level: 1 })
|
|
27
|
-
*/
|
|
28
|
-
setHeading: (attributes: {
|
|
29
|
-
level: Level;
|
|
30
|
-
}) => ReturnType;
|
|
31
|
-
/**
|
|
32
|
-
* Toggle a heading node
|
|
33
|
-
* @param attributes The heading attributes
|
|
34
|
-
* @example editor.commands.toggleHeading({ level: 1 })
|
|
35
|
-
*/
|
|
36
|
-
toggleHeading: (attributes: {
|
|
37
|
-
level: Level;
|
|
38
|
-
}) => ReturnType;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* This extension allows you to create headings.
|
|
44
|
-
* @see https://www.tiptap.dev/api/nodes/heading
|
|
45
|
-
*/
|
|
46
|
-
export declare const Heading: Node<HeadingOptions, any>;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Extension } from '@tiptap/core';
|
|
2
|
-
export interface HistoryOptions {
|
|
3
|
-
/**
|
|
4
|
-
* The amount of history events that are collected before the oldest events are discarded.
|
|
5
|
-
* @default 100
|
|
6
|
-
* @example 50
|
|
7
|
-
*/
|
|
8
|
-
depth: number;
|
|
9
|
-
/**
|
|
10
|
-
* The delay (in milliseconds) between changes after which a new group should be started.
|
|
11
|
-
* @default 500
|
|
12
|
-
* @example 1000
|
|
13
|
-
*/
|
|
14
|
-
newGroupDelay: number;
|
|
15
|
-
}
|
|
16
|
-
declare module '@tiptap/core' {
|
|
17
|
-
interface Commands<ReturnType> {
|
|
18
|
-
history: {
|
|
19
|
-
/**
|
|
20
|
-
* Undo recent changes
|
|
21
|
-
* @example editor.commands.undo()
|
|
22
|
-
*/
|
|
23
|
-
undo: () => ReturnType;
|
|
24
|
-
/**
|
|
25
|
-
* Reapply reverted changes
|
|
26
|
-
* @example editor.commands.redo()
|
|
27
|
-
*/
|
|
28
|
-
redo: () => ReturnType;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* This extension allows you to undo and redo recent changes.
|
|
34
|
-
* @see https://www.tiptap.dev/api/extensions/history
|
|
35
|
-
*
|
|
36
|
-
* **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove
|
|
37
|
-
* the `history` extension, as it is not compatible with the `collaboration` extension.
|
|
38
|
-
*
|
|
39
|
-
* `@tiptap/extension-collaboration` uses its own history implementation.
|
|
40
|
-
*/
|
|
41
|
-
export declare const History: Extension<HistoryOptions, any>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Node } from '@tiptap/core';
|
|
2
|
-
export interface HorizontalRuleOptions {
|
|
3
|
-
/**
|
|
4
|
-
* The HTML attributes for a horizontal rule node.
|
|
5
|
-
* @default {}
|
|
6
|
-
* @example { class: 'foo' }
|
|
7
|
-
*/
|
|
8
|
-
HTMLAttributes: Record<string, any>;
|
|
9
|
-
}
|
|
10
|
-
declare module '@tiptap/core' {
|
|
11
|
-
interface Commands<ReturnType> {
|
|
12
|
-
horizontalRule: {
|
|
13
|
-
/**
|
|
14
|
-
* Add a horizontal rule
|
|
15
|
-
* @example editor.commands.setHorizontalRule()
|
|
16
|
-
*/
|
|
17
|
-
setHorizontalRule: () => ReturnType;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* This extension allows you to insert horizontal rules.
|
|
23
|
-
* @see https://www.tiptap.dev/api/nodes/horizontal-rule
|
|
24
|
-
*/
|
|
25
|
-
export declare const HorizontalRule: Node<HorizontalRuleOptions, any>;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Mark } from '@tiptap/core';
|
|
2
|
-
export interface ItalicOptions {
|
|
3
|
-
/**
|
|
4
|
-
* HTML attributes to add to the italic element.
|
|
5
|
-
* @default {}
|
|
6
|
-
* @example { class: 'foo' }
|
|
7
|
-
*/
|
|
8
|
-
HTMLAttributes: Record<string, any>;
|
|
9
|
-
}
|
|
10
|
-
declare module '@tiptap/core' {
|
|
11
|
-
interface Commands<ReturnType> {
|
|
12
|
-
italic: {
|
|
13
|
-
/**
|
|
14
|
-
* Set an italic mark
|
|
15
|
-
* @example editor.commands.setItalic()
|
|
16
|
-
*/
|
|
17
|
-
setItalic: () => ReturnType;
|
|
18
|
-
/**
|
|
19
|
-
* Toggle an italic mark
|
|
20
|
-
* @example editor.commands.toggleItalic()
|
|
21
|
-
*/
|
|
22
|
-
toggleItalic: () => ReturnType;
|
|
23
|
-
/**
|
|
24
|
-
* Unset an italic mark
|
|
25
|
-
* @example editor.commands.unsetItalic()
|
|
26
|
-
*/
|
|
27
|
-
unsetItalic: () => ReturnType;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Matches an italic to a *italic* on input.
|
|
33
|
-
*/
|
|
34
|
-
export declare const starInputRegex: RegExp;
|
|
35
|
-
/**
|
|
36
|
-
* Matches an italic to a *italic* on paste.
|
|
37
|
-
*/
|
|
38
|
-
export declare const starPasteRegex: RegExp;
|
|
39
|
-
/**
|
|
40
|
-
* Matches an italic to a _italic_ on input.
|
|
41
|
-
*/
|
|
42
|
-
export declare const underscoreInputRegex: RegExp;
|
|
43
|
-
/**
|
|
44
|
-
* Matches an italic to a _italic_ on paste.
|
|
45
|
-
*/
|
|
46
|
-
export declare const underscorePasteRegex: RegExp;
|
|
47
|
-
/**
|
|
48
|
-
* This extension allows you to create italic text.
|
|
49
|
-
* @see https://www.tiptap.dev/api/marks/italic
|
|
50
|
-
*/
|
|
51
|
-
export declare const Italic: Mark<ItalicOptions, any>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Node } from '@tiptap/core';
|
|
2
|
-
export interface ListItemOptions {
|
|
3
|
-
/**
|
|
4
|
-
* The HTML attributes for a list item node.
|
|
5
|
-
* @default {}
|
|
6
|
-
* @example { class: 'foo' }
|
|
7
|
-
*/
|
|
8
|
-
HTMLAttributes: Record<string, any>;
|
|
9
|
-
/**
|
|
10
|
-
* The node type for bulletList nodes
|
|
11
|
-
* @default 'bulletList'
|
|
12
|
-
* @example 'myCustomBulletList'
|
|
13
|
-
*/
|
|
14
|
-
bulletListTypeName: string;
|
|
15
|
-
/**
|
|
16
|
-
* The node type for orderedList nodes
|
|
17
|
-
* @default 'orderedList'
|
|
18
|
-
* @example 'myCustomOrderedList'
|
|
19
|
-
*/
|
|
20
|
-
orderedListTypeName: string;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* This extension allows you to create list items.
|
|
24
|
-
* @see https://www.tiptap.dev/api/nodes/list-item
|
|
25
|
-
*/
|
|
26
|
-
export declare const ListItem: Node<ListItemOptions, any>;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Node } from '@tiptap/core';
|
|
2
|
-
export interface OrderedListOptions {
|
|
3
|
-
/**
|
|
4
|
-
* The node type name for list items.
|
|
5
|
-
* @default 'listItem'
|
|
6
|
-
* @example 'myListItem'
|
|
7
|
-
*/
|
|
8
|
-
itemTypeName: string;
|
|
9
|
-
/**
|
|
10
|
-
* The HTML attributes for an ordered list node.
|
|
11
|
-
* @default {}
|
|
12
|
-
* @example { class: 'foo' }
|
|
13
|
-
*/
|
|
14
|
-
HTMLAttributes: Record<string, any>;
|
|
15
|
-
/**
|
|
16
|
-
* Keep the marks when splitting a list item.
|
|
17
|
-
* @default false
|
|
18
|
-
* @example true
|
|
19
|
-
*/
|
|
20
|
-
keepMarks: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Keep the attributes when splitting a list item.
|
|
23
|
-
* @default false
|
|
24
|
-
* @example true
|
|
25
|
-
*/
|
|
26
|
-
keepAttributes: boolean;
|
|
27
|
-
}
|
|
28
|
-
declare module '@tiptap/core' {
|
|
29
|
-
interface Commands<ReturnType> {
|
|
30
|
-
orderedList: {
|
|
31
|
-
/**
|
|
32
|
-
* Toggle an ordered list
|
|
33
|
-
* @example editor.commands.toggleOrderedList()
|
|
34
|
-
*/
|
|
35
|
-
toggleOrderedList: () => ReturnType;
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Matches an ordered list to a 1. on input (or any number followed by a dot).
|
|
41
|
-
*/
|
|
42
|
-
export declare const inputRegex: RegExp;
|
|
43
|
-
/**
|
|
44
|
-
* This extension allows you to create ordered lists.
|
|
45
|
-
* This requires the ListItem extension
|
|
46
|
-
* @see https://www.tiptap.dev/api/nodes/ordered-list
|
|
47
|
-
* @see https://www.tiptap.dev/api/nodes/list-item
|
|
48
|
-
*/
|
|
49
|
-
export declare const OrderedList: Node<OrderedListOptions, any>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Node } from '@tiptap/core';
|
|
2
|
-
export interface ParagraphOptions {
|
|
3
|
-
/**
|
|
4
|
-
* The HTML attributes for a paragraph node.
|
|
5
|
-
* @default {}
|
|
6
|
-
* @example { class: 'foo' }
|
|
7
|
-
*/
|
|
8
|
-
HTMLAttributes: Record<string, any>;
|
|
9
|
-
}
|
|
10
|
-
declare module '@tiptap/core' {
|
|
11
|
-
interface Commands<ReturnType> {
|
|
12
|
-
paragraph: {
|
|
13
|
-
/**
|
|
14
|
-
* Toggle a paragraph
|
|
15
|
-
* @example editor.commands.toggleParagraph()
|
|
16
|
-
*/
|
|
17
|
-
setParagraph: () => ReturnType;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* This extension allows you to create paragraphs.
|
|
23
|
-
* @see https://www.tiptap.dev/api/nodes/paragraph
|
|
24
|
-
*/
|
|
25
|
-
export declare const Paragraph: Node<ParagraphOptions, any>;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Mark } from '@tiptap/core';
|
|
2
|
-
export interface StrikeOptions {
|
|
3
|
-
/**
|
|
4
|
-
* HTML attributes to add to the strike element.
|
|
5
|
-
* @default {}
|
|
6
|
-
* @example { class: 'foo' }
|
|
7
|
-
*/
|
|
8
|
-
HTMLAttributes: Record<string, any>;
|
|
9
|
-
}
|
|
10
|
-
declare module '@tiptap/core' {
|
|
11
|
-
interface Commands<ReturnType> {
|
|
12
|
-
strike: {
|
|
13
|
-
/**
|
|
14
|
-
* Set a strike mark
|
|
15
|
-
* @example editor.commands.setStrike()
|
|
16
|
-
*/
|
|
17
|
-
setStrike: () => ReturnType;
|
|
18
|
-
/**
|
|
19
|
-
* Toggle a strike mark
|
|
20
|
-
* @example editor.commands.toggleStrike()
|
|
21
|
-
*/
|
|
22
|
-
toggleStrike: () => ReturnType;
|
|
23
|
-
/**
|
|
24
|
-
* Unset a strike mark
|
|
25
|
-
* @example editor.commands.unsetStrike()
|
|
26
|
-
*/
|
|
27
|
-
unsetStrike: () => ReturnType;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Matches a strike to a ~~strike~~ on input.
|
|
33
|
-
*/
|
|
34
|
-
export declare const inputRegex: RegExp;
|
|
35
|
-
/**
|
|
36
|
-
* Matches a strike to a ~~strike~~ on paste.
|
|
37
|
-
*/
|
|
38
|
-
export declare const pasteRegex: RegExp;
|
|
39
|
-
/**
|
|
40
|
-
* This extension allows you to create strike text.
|
|
41
|
-
* @see https://www.tiptap.dev/api/marks/strike
|
|
42
|
-
*/
|
|
43
|
-
export declare const Strike: Mark<StrikeOptions, any>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Mark } from '@tiptap/core';
|
|
2
|
-
export interface TextStyleOptions {
|
|
3
|
-
/**
|
|
4
|
-
* HTML attributes to add to the span element.
|
|
5
|
-
* @default {}
|
|
6
|
-
* @example { class: 'foo' }
|
|
7
|
-
*/
|
|
8
|
-
HTMLAttributes: Record<string, any>;
|
|
9
|
-
}
|
|
10
|
-
declare module '@tiptap/core' {
|
|
11
|
-
interface Commands<ReturnType> {
|
|
12
|
-
textStyle: {
|
|
13
|
-
/**
|
|
14
|
-
* Remove spans without inline style attributes.
|
|
15
|
-
* @example editor.commands.removeEmptyTextStyle()
|
|
16
|
-
*/
|
|
17
|
-
removeEmptyTextStyle: () => ReturnType;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* This extension allows you to create text styles. It is required by default
|
|
23
|
-
* for the `textColor` and `backgroundColor` extensions.
|
|
24
|
-
* @see https://www.tiptap.dev/api/marks/text-style
|
|
25
|
-
*/
|
|
26
|
-
export declare const TextStyle: Mark<TextStyleOptions, any>;
|