@tiptap/starter-kit 2.7.4 → 2.9.0
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/dist/{packages/starter-kit/src/index.d.ts → index.d.ts} +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/{packages/starter-kit/src/starter-kit.d.ts → starter-kit.d.ts} +1 -0
- package/dist/starter-kit.d.ts.map +1 -0
- package/package.json +24 -23
- package/dist/packages/core/src/CommandManager.d.ts +0 -20
- package/dist/packages/core/src/Editor.d.ts +0 -165
- package/dist/packages/core/src/EventEmitter.d.ts +0 -11
- package/dist/packages/core/src/Extension.d.ts +0 -344
- package/dist/packages/core/src/ExtensionManager.d.ts +0 -56
- package/dist/packages/core/src/InputRule.d.ts +0 -42
- package/dist/packages/core/src/Mark.d.ts +0 -452
- package/dist/packages/core/src/Node.d.ts +0 -612
- package/dist/packages/core/src/NodePos.d.ts +0 -44
- package/dist/packages/core/src/NodeView.d.ts +0 -43
- 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 -16
- 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 -16
- 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 -14
- 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 -26
- 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 -14
- package/dist/packages/core/src/pasteRules/textPasteRule.d.ts +0 -10
- package/dist/packages/core/src/plugins/DropPlugin.d.ts +0 -3
- package/dist/packages/core/src/plugins/PastePlugin.d.ts +0 -3
- package/dist/packages/core/src/style.d.ts +0 -1
- package/dist/packages/core/src/types.d.ts +0 -270
- 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 -65
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACzD,cAAc,kBAAkB,CAAA;AAEhC,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starter-kit.d.ts","sourceRoot":"","sources":["../src/starter-kit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAc,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAC5E,OAAO,EAAQ,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAc,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAC7E,OAAO,EAAQ,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAa,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAE1E,OAAO,EAAc,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAE5E,OAAO,EAAa,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAC1E,OAAO,EAAW,cAAc,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAW,cAAc,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAkB,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AACzF,OAAO,EAAU,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,EAAY,eAAe,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAe,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AAChF,OAAO,EAAa,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,EAAU,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAGhE,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,UAAU,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAAC;IAE/C;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;IAEnC;;;OAGG;IACH,UAAU,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAAC;IAE/C;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;IAEnC;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC;IAE7C;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC;IAEhB;;;OAGG;IACH,UAAU,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAAC;IAE/C;;;OAGG;IACH,SAAS,EAAE,KAAK,CAAC;IAEjB;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC;IAE7C;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC;IAEzC;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC;IAEzC;;;OAGG;IACH,cAAc,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,KAAK,CAAC;IAEvD;;;OAGG;IACH,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC;IAEvC;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC;IAE3C;;;OAGG;IACH,WAAW,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,KAAK,CAAC;IAEjD;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC;IAE7C;;;OAGG;IACH,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC;IAEvC;;;OAGG;IACH,IAAI,EAAE,KAAK,CAAC;CACb;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,mCAgFrB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiptap/starter-kit",
|
|
3
3
|
"description": "starter kit for tiptap",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.9.0",
|
|
5
5
|
"homepage": "https://tiptap.dev",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"tiptap",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|
|
17
|
-
"types": "./dist/
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
18
|
"import": "./dist/index.js",
|
|
19
19
|
"require": "./dist/index.cjs"
|
|
20
20
|
}
|
|
@@ -22,33 +22,34 @@
|
|
|
22
22
|
"main": "dist/index.cjs",
|
|
23
23
|
"module": "dist/index.js",
|
|
24
24
|
"umd": "dist/index.umd.js",
|
|
25
|
-
"types": "dist/
|
|
25
|
+
"types": "dist/index.d.ts",
|
|
26
26
|
"type": "module",
|
|
27
27
|
"files": [
|
|
28
28
|
"src",
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@tiptap/core": "^2.
|
|
33
|
-
"@tiptap/extension-blockquote": "^2.
|
|
34
|
-
"@tiptap/extension-bold": "^2.
|
|
35
|
-
"@tiptap/extension-bullet-list": "^2.
|
|
36
|
-
"@tiptap/extension-code": "^2.
|
|
37
|
-
"@tiptap/extension-code-block": "^2.
|
|
38
|
-
"@tiptap/extension-document": "^2.
|
|
39
|
-
"@tiptap/extension-dropcursor": "^2.
|
|
40
|
-
"@tiptap/extension-gapcursor": "^2.
|
|
41
|
-
"@tiptap/extension-hard-break": "^2.
|
|
42
|
-
"@tiptap/extension-heading": "^2.
|
|
43
|
-
"@tiptap/extension-history": "^2.
|
|
44
|
-
"@tiptap/extension-horizontal-rule": "^2.
|
|
45
|
-
"@tiptap/extension-italic": "^2.
|
|
46
|
-
"@tiptap/extension-list-item": "^2.
|
|
47
|
-
"@tiptap/extension-ordered-list": "^2.
|
|
48
|
-
"@tiptap/extension-paragraph": "^2.
|
|
49
|
-
"@tiptap/extension-strike": "^2.
|
|
50
|
-
"@tiptap/extension-text": "^2.
|
|
51
|
-
"@tiptap/
|
|
32
|
+
"@tiptap/core": "^2.9.0",
|
|
33
|
+
"@tiptap/extension-blockquote": "^2.9.0",
|
|
34
|
+
"@tiptap/extension-bold": "^2.9.0",
|
|
35
|
+
"@tiptap/extension-bullet-list": "^2.9.0",
|
|
36
|
+
"@tiptap/extension-code": "^2.9.0",
|
|
37
|
+
"@tiptap/extension-code-block": "^2.9.0",
|
|
38
|
+
"@tiptap/extension-document": "^2.9.0",
|
|
39
|
+
"@tiptap/extension-dropcursor": "^2.9.0",
|
|
40
|
+
"@tiptap/extension-gapcursor": "^2.9.0",
|
|
41
|
+
"@tiptap/extension-hard-break": "^2.9.0",
|
|
42
|
+
"@tiptap/extension-heading": "^2.9.0",
|
|
43
|
+
"@tiptap/extension-history": "^2.9.0",
|
|
44
|
+
"@tiptap/extension-horizontal-rule": "^2.9.0",
|
|
45
|
+
"@tiptap/extension-italic": "^2.9.0",
|
|
46
|
+
"@tiptap/extension-list-item": "^2.9.0",
|
|
47
|
+
"@tiptap/extension-ordered-list": "^2.9.0",
|
|
48
|
+
"@tiptap/extension-paragraph": "^2.9.0",
|
|
49
|
+
"@tiptap/extension-strike": "^2.9.0",
|
|
50
|
+
"@tiptap/extension-text": "^2.9.0",
|
|
51
|
+
"@tiptap/extension-text-style": "^2.9.0",
|
|
52
|
+
"@tiptap/pm": "^2.9.0"
|
|
52
53
|
},
|
|
53
54
|
"repository": {
|
|
54
55
|
"type": "git",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { EditorState, Transaction } from '@tiptap/pm/state';
|
|
2
|
-
import { Editor } from './Editor.js';
|
|
3
|
-
import { AnyCommands, CanCommands, ChainedCommands, CommandProps, SingleCommands } from './types.js';
|
|
4
|
-
export declare class CommandManager {
|
|
5
|
-
editor: Editor;
|
|
6
|
-
rawCommands: AnyCommands;
|
|
7
|
-
customState?: EditorState;
|
|
8
|
-
constructor(props: {
|
|
9
|
-
editor: Editor;
|
|
10
|
-
state?: EditorState;
|
|
11
|
-
});
|
|
12
|
-
get hasCustomState(): boolean;
|
|
13
|
-
get state(): EditorState;
|
|
14
|
-
get commands(): SingleCommands;
|
|
15
|
-
get chain(): () => ChainedCommands;
|
|
16
|
-
get can(): () => CanCommands;
|
|
17
|
-
createChain(startTr?: Transaction, shouldDispatch?: boolean): ChainedCommands;
|
|
18
|
-
createCan(startTr?: Transaction): CanCommands;
|
|
19
|
-
buildProps(tr: Transaction, shouldDispatch?: boolean): CommandProps;
|
|
20
|
-
}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { MarkType, NodeType, Schema } from '@tiptap/pm/model';
|
|
2
|
-
import { EditorState, Plugin, PluginKey, Transaction } from '@tiptap/pm/state';
|
|
3
|
-
import { EditorView } from '@tiptap/pm/view';
|
|
4
|
-
import { EventEmitter } from './EventEmitter.js';
|
|
5
|
-
import { ExtensionManager } from './ExtensionManager.js';
|
|
6
|
-
import { NodePos } from './NodePos.js';
|
|
7
|
-
import { CanCommands, ChainedCommands, EditorEvents, EditorOptions, JSONContent, SingleCommands, TextSerializer } from './types.js';
|
|
8
|
-
export * as extensions from './extensions/index.js';
|
|
9
|
-
export interface TiptapEditorHTMLElement extends HTMLElement {
|
|
10
|
-
editor?: Editor;
|
|
11
|
-
}
|
|
12
|
-
export declare class Editor extends EventEmitter<EditorEvents> {
|
|
13
|
-
private commandManager;
|
|
14
|
-
extensionManager: ExtensionManager;
|
|
15
|
-
private css;
|
|
16
|
-
schema: Schema;
|
|
17
|
-
view: EditorView;
|
|
18
|
-
isFocused: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* The editor is considered initialized after the `create` event has been emitted.
|
|
21
|
-
*/
|
|
22
|
-
isInitialized: boolean;
|
|
23
|
-
extensionStorage: Record<string, any>;
|
|
24
|
-
options: EditorOptions;
|
|
25
|
-
constructor(options?: Partial<EditorOptions>);
|
|
26
|
-
/**
|
|
27
|
-
* Returns the editor storage.
|
|
28
|
-
*/
|
|
29
|
-
get storage(): Record<string, any>;
|
|
30
|
-
/**
|
|
31
|
-
* An object of all registered commands.
|
|
32
|
-
*/
|
|
33
|
-
get commands(): SingleCommands;
|
|
34
|
-
/**
|
|
35
|
-
* Create a command chain to call multiple commands at once.
|
|
36
|
-
*/
|
|
37
|
-
chain(): ChainedCommands;
|
|
38
|
-
/**
|
|
39
|
-
* Check if a command or a command chain can be executed. Without executing it.
|
|
40
|
-
*/
|
|
41
|
-
can(): CanCommands;
|
|
42
|
-
/**
|
|
43
|
-
* Inject CSS styles.
|
|
44
|
-
*/
|
|
45
|
-
private injectCSS;
|
|
46
|
-
/**
|
|
47
|
-
* Update editor options.
|
|
48
|
-
*
|
|
49
|
-
* @param options A list of options
|
|
50
|
-
*/
|
|
51
|
-
setOptions(options?: Partial<EditorOptions>): void;
|
|
52
|
-
/**
|
|
53
|
-
* Update editable state of the editor.
|
|
54
|
-
*/
|
|
55
|
-
setEditable(editable: boolean, emitUpdate?: boolean): void;
|
|
56
|
-
/**
|
|
57
|
-
* Returns whether the editor is editable.
|
|
58
|
-
*/
|
|
59
|
-
get isEditable(): boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Returns the editor state.
|
|
62
|
-
*/
|
|
63
|
-
get state(): EditorState;
|
|
64
|
-
/**
|
|
65
|
-
* Register a ProseMirror plugin.
|
|
66
|
-
*
|
|
67
|
-
* @param plugin A ProseMirror plugin
|
|
68
|
-
* @param handlePlugins Control how to merge the plugin into the existing plugins.
|
|
69
|
-
* @returns The new editor state
|
|
70
|
-
*/
|
|
71
|
-
registerPlugin(plugin: Plugin, handlePlugins?: (newPlugin: Plugin, plugins: Plugin[]) => Plugin[]): EditorState;
|
|
72
|
-
/**
|
|
73
|
-
* Unregister a ProseMirror plugin.
|
|
74
|
-
*
|
|
75
|
-
* @param nameOrPluginKey The plugins name
|
|
76
|
-
* @returns The new editor state or undefined if the editor is destroyed
|
|
77
|
-
*/
|
|
78
|
-
unregisterPlugin(nameOrPluginKey: string | PluginKey): EditorState | undefined;
|
|
79
|
-
/**
|
|
80
|
-
* Creates an extension manager.
|
|
81
|
-
*/
|
|
82
|
-
private createExtensionManager;
|
|
83
|
-
/**
|
|
84
|
-
* Creates an command manager.
|
|
85
|
-
*/
|
|
86
|
-
private createCommandManager;
|
|
87
|
-
/**
|
|
88
|
-
* Creates a ProseMirror schema.
|
|
89
|
-
*/
|
|
90
|
-
private createSchema;
|
|
91
|
-
/**
|
|
92
|
-
* Creates a ProseMirror view.
|
|
93
|
-
*/
|
|
94
|
-
private createView;
|
|
95
|
-
/**
|
|
96
|
-
* Creates all node views.
|
|
97
|
-
*/
|
|
98
|
-
createNodeViews(): void;
|
|
99
|
-
/**
|
|
100
|
-
* Prepend class name to element.
|
|
101
|
-
*/
|
|
102
|
-
prependClass(): void;
|
|
103
|
-
isCapturingTransaction: boolean;
|
|
104
|
-
private capturedTransaction;
|
|
105
|
-
captureTransaction(fn: Function): Transaction | null;
|
|
106
|
-
/**
|
|
107
|
-
* The callback over which to send transactions (state updates) produced by the view.
|
|
108
|
-
*
|
|
109
|
-
* @param transaction An editor state transaction
|
|
110
|
-
*/
|
|
111
|
-
private dispatchTransaction;
|
|
112
|
-
/**
|
|
113
|
-
* Get attributes of the currently selected node or mark.
|
|
114
|
-
*/
|
|
115
|
-
getAttributes(nameOrType: string | NodeType | MarkType): Record<string, any>;
|
|
116
|
-
/**
|
|
117
|
-
* Returns if the currently selected node or mark is active.
|
|
118
|
-
*
|
|
119
|
-
* @param name Name of the node or mark
|
|
120
|
-
* @param attributes Attributes of the node or mark
|
|
121
|
-
*/
|
|
122
|
-
isActive(name: string, attributes?: {}): boolean;
|
|
123
|
-
isActive(attributes: {}): boolean;
|
|
124
|
-
/**
|
|
125
|
-
* Get the document as JSON.
|
|
126
|
-
*/
|
|
127
|
-
getJSON(): JSONContent;
|
|
128
|
-
/**
|
|
129
|
-
* Get the document as HTML.
|
|
130
|
-
*/
|
|
131
|
-
getHTML(): string;
|
|
132
|
-
/**
|
|
133
|
-
* Get the document as text.
|
|
134
|
-
*/
|
|
135
|
-
getText(options?: {
|
|
136
|
-
blockSeparator?: string;
|
|
137
|
-
textSerializers?: Record<string, TextSerializer>;
|
|
138
|
-
}): string;
|
|
139
|
-
/**
|
|
140
|
-
* Check if there is no content.
|
|
141
|
-
*/
|
|
142
|
-
get isEmpty(): boolean;
|
|
143
|
-
/**
|
|
144
|
-
* Get the number of characters for the current document.
|
|
145
|
-
*
|
|
146
|
-
* @deprecated
|
|
147
|
-
*/
|
|
148
|
-
getCharacterCount(): number;
|
|
149
|
-
/**
|
|
150
|
-
* Destroy the editor.
|
|
151
|
-
*/
|
|
152
|
-
destroy(): void;
|
|
153
|
-
/**
|
|
154
|
-
* Check if the editor is already destroyed.
|
|
155
|
-
*/
|
|
156
|
-
get isDestroyed(): boolean;
|
|
157
|
-
$node(selector: string, attributes?: {
|
|
158
|
-
[key: string]: any;
|
|
159
|
-
}): NodePos | null;
|
|
160
|
-
$nodes(selector: string, attributes?: {
|
|
161
|
-
[key: string]: any;
|
|
162
|
-
}): NodePos[] | null;
|
|
163
|
-
$pos(pos: number): NodePos;
|
|
164
|
-
get $doc(): NodePos;
|
|
165
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
type StringKeyOf<T> = Extract<keyof T, string>;
|
|
2
|
-
type CallbackType<T extends Record<string, any>, EventName extends StringKeyOf<T>> = T[EventName] extends any[] ? T[EventName] : [T[EventName]];
|
|
3
|
-
type CallbackFunction<T extends Record<string, any>, EventName extends StringKeyOf<T>> = (...props: CallbackType<T, EventName>) => any;
|
|
4
|
-
export declare class EventEmitter<T extends Record<string, any>> {
|
|
5
|
-
private callbacks;
|
|
6
|
-
on<EventName extends StringKeyOf<T>>(event: EventName, fn: CallbackFunction<T, EventName>): this;
|
|
7
|
-
emit<EventName extends StringKeyOf<T>>(event: EventName, ...args: CallbackType<T, EventName>): this;
|
|
8
|
-
off<EventName extends StringKeyOf<T>>(event: EventName, fn?: CallbackFunction<T, EventName>): this;
|
|
9
|
-
removeAllListeners(): void;
|
|
10
|
-
}
|
|
11
|
-
export {};
|
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
import { Plugin, Transaction } from '@tiptap/pm/state';
|
|
2
|
-
import { Editor } from './Editor.js';
|
|
3
|
-
import { ExtensionConfig } from './index.js';
|
|
4
|
-
import { InputRule } from './InputRule.js';
|
|
5
|
-
import { Mark } from './Mark.js';
|
|
6
|
-
import { Node } from './Node.js';
|
|
7
|
-
import { PasteRule } from './PasteRule.js';
|
|
8
|
-
import { Extensions, GlobalAttributes, KeyboardShortcutCommand, ParentConfig, RawCommands } from './types.js';
|
|
9
|
-
declare module '@tiptap/core' {
|
|
10
|
-
interface ExtensionConfig<Options = any, Storage = any> {
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
/**
|
|
13
|
-
* The extension name - this must be unique.
|
|
14
|
-
* It will be used to identify the extension.
|
|
15
|
-
*
|
|
16
|
-
* @example 'myExtension'
|
|
17
|
-
*/
|
|
18
|
-
name: string;
|
|
19
|
-
/**
|
|
20
|
-
* The priority of your extension. The higher, the earlier it will be called
|
|
21
|
-
* and will take precedence over other extensions with a lower priority.
|
|
22
|
-
* @default 100
|
|
23
|
-
* @example 101
|
|
24
|
-
*/
|
|
25
|
-
priority?: number;
|
|
26
|
-
/**
|
|
27
|
-
* The default options for this extension.
|
|
28
|
-
* @example
|
|
29
|
-
* defaultOptions: {
|
|
30
|
-
* myOption: 'foo',
|
|
31
|
-
* myOtherOption: 10,
|
|
32
|
-
* }
|
|
33
|
-
*/
|
|
34
|
-
defaultOptions?: Options;
|
|
35
|
-
/**
|
|
36
|
-
* This method will add options to this extension
|
|
37
|
-
* @see https://tiptap.dev/docs/editor/guide/custom-extensions#settings
|
|
38
|
-
* @example
|
|
39
|
-
* addOptions() {
|
|
40
|
-
* return {
|
|
41
|
-
* myOption: 'foo',
|
|
42
|
-
* myOtherOption: 10,
|
|
43
|
-
* }
|
|
44
|
-
*/
|
|
45
|
-
addOptions?: (this: {
|
|
46
|
-
name: string;
|
|
47
|
-
parent: Exclude<ParentConfig<ExtensionConfig<Options, Storage>>['addOptions'], undefined>;
|
|
48
|
-
}) => Options;
|
|
49
|
-
/**
|
|
50
|
-
* The default storage this extension can save data to.
|
|
51
|
-
* @see https://tiptap.dev/docs/editor/guide/custom-extensions#storage
|
|
52
|
-
* @example
|
|
53
|
-
* defaultStorage: {
|
|
54
|
-
* prefetchedUsers: [],
|
|
55
|
-
* loading: false,
|
|
56
|
-
* }
|
|
57
|
-
*/
|
|
58
|
-
addStorage?: (this: {
|
|
59
|
-
name: string;
|
|
60
|
-
options: Options;
|
|
61
|
-
parent: Exclude<ParentConfig<ExtensionConfig<Options, Storage>>['addStorage'], undefined>;
|
|
62
|
-
}) => Storage;
|
|
63
|
-
/**
|
|
64
|
-
* This function adds globalAttributes to specific nodes.
|
|
65
|
-
* @see https://tiptap.dev/docs/editor/guide/custom-extensions#global-attributes
|
|
66
|
-
* @example
|
|
67
|
-
* addGlobalAttributes() {
|
|
68
|
-
* return [
|
|
69
|
-
* {
|
|
70
|
-
// Extend the following extensions
|
|
71
|
-
* types: [
|
|
72
|
-
* 'heading',
|
|
73
|
-
* 'paragraph',
|
|
74
|
-
* ],
|
|
75
|
-
* // … with those attributes
|
|
76
|
-
* attributes: {
|
|
77
|
-
* textAlign: {
|
|
78
|
-
* default: 'left',
|
|
79
|
-
* renderHTML: attributes => ({
|
|
80
|
-
* style: `text-align: ${attributes.textAlign}`,
|
|
81
|
-
* }),
|
|
82
|
-
* parseHTML: element => element.style.textAlign || 'left',
|
|
83
|
-
* },
|
|
84
|
-
* },
|
|
85
|
-
* },
|
|
86
|
-
* ]
|
|
87
|
-
* }
|
|
88
|
-
*/
|
|
89
|
-
addGlobalAttributes?: (this: {
|
|
90
|
-
name: string;
|
|
91
|
-
options: Options;
|
|
92
|
-
storage: Storage;
|
|
93
|
-
extensions: (Node | Mark)[];
|
|
94
|
-
parent: ParentConfig<ExtensionConfig<Options, Storage>>['addGlobalAttributes'];
|
|
95
|
-
}) => GlobalAttributes;
|
|
96
|
-
/**
|
|
97
|
-
* This function adds commands to the editor
|
|
98
|
-
* @see https://tiptap.dev/docs/editor/guide/custom-extensions#commands
|
|
99
|
-
* @example
|
|
100
|
-
* addCommands() {
|
|
101
|
-
* return {
|
|
102
|
-
* myCommand: () => ({ chain }) => chain().setMark('type', 'foo').run(),
|
|
103
|
-
* }
|
|
104
|
-
* }
|
|
105
|
-
*/
|
|
106
|
-
addCommands?: (this: {
|
|
107
|
-
name: string;
|
|
108
|
-
options: Options;
|
|
109
|
-
storage: Storage;
|
|
110
|
-
editor: Editor;
|
|
111
|
-
parent: ParentConfig<ExtensionConfig<Options, Storage>>['addCommands'];
|
|
112
|
-
}) => Partial<RawCommands>;
|
|
113
|
-
/**
|
|
114
|
-
* This function registers keyboard shortcuts.
|
|
115
|
-
* @see https://tiptap.dev/docs/editor/guide/custom-extensions#keyboard-shortcuts
|
|
116
|
-
* @example
|
|
117
|
-
* addKeyboardShortcuts() {
|
|
118
|
-
* return {
|
|
119
|
-
* 'Mod-l': () => this.editor.commands.toggleBulletList(),
|
|
120
|
-
* }
|
|
121
|
-
* },
|
|
122
|
-
*/
|
|
123
|
-
addKeyboardShortcuts?: (this: {
|
|
124
|
-
name: string;
|
|
125
|
-
options: Options;
|
|
126
|
-
storage: Storage;
|
|
127
|
-
editor: Editor;
|
|
128
|
-
parent: ParentConfig<ExtensionConfig<Options, Storage>>['addKeyboardShortcuts'];
|
|
129
|
-
}) => {
|
|
130
|
-
[key: string]: KeyboardShortcutCommand;
|
|
131
|
-
};
|
|
132
|
-
/**
|
|
133
|
-
* This function adds input rules to the editor.
|
|
134
|
-
* @see https://tiptap.dev/docs/editor/guide/custom-extensions#input-rules
|
|
135
|
-
* @example
|
|
136
|
-
* addInputRules() {
|
|
137
|
-
* return [
|
|
138
|
-
* markInputRule({
|
|
139
|
-
* find: inputRegex,
|
|
140
|
-
* type: this.type,
|
|
141
|
-
* }),
|
|
142
|
-
* ]
|
|
143
|
-
* },
|
|
144
|
-
*/
|
|
145
|
-
addInputRules?: (this: {
|
|
146
|
-
name: string;
|
|
147
|
-
options: Options;
|
|
148
|
-
storage: Storage;
|
|
149
|
-
editor: Editor;
|
|
150
|
-
parent: ParentConfig<ExtensionConfig<Options, Storage>>['addInputRules'];
|
|
151
|
-
}) => InputRule[];
|
|
152
|
-
/**
|
|
153
|
-
* This function adds paste rules to the editor.
|
|
154
|
-
* @see https://tiptap.dev/docs/editor/guide/custom-extensions#paste-rules
|
|
155
|
-
* @example
|
|
156
|
-
* addPasteRules() {
|
|
157
|
-
* return [
|
|
158
|
-
* markPasteRule({
|
|
159
|
-
* find: pasteRegex,
|
|
160
|
-
* type: this.type,
|
|
161
|
-
* }),
|
|
162
|
-
* ]
|
|
163
|
-
* },
|
|
164
|
-
*/
|
|
165
|
-
addPasteRules?: (this: {
|
|
166
|
-
name: string;
|
|
167
|
-
options: Options;
|
|
168
|
-
storage: Storage;
|
|
169
|
-
editor: Editor;
|
|
170
|
-
parent: ParentConfig<ExtensionConfig<Options, Storage>>['addPasteRules'];
|
|
171
|
-
}) => PasteRule[];
|
|
172
|
-
/**
|
|
173
|
-
* This function adds Prosemirror plugins to the editor
|
|
174
|
-
* @see https://tiptap.dev/docs/editor/guide/custom-extensions#prosemirror-plugins
|
|
175
|
-
* @example
|
|
176
|
-
* addProseMirrorPlugins() {
|
|
177
|
-
* return [
|
|
178
|
-
* customPlugin(),
|
|
179
|
-
* ]
|
|
180
|
-
* }
|
|
181
|
-
*/
|
|
182
|
-
addProseMirrorPlugins?: (this: {
|
|
183
|
-
name: string;
|
|
184
|
-
options: Options;
|
|
185
|
-
storage: Storage;
|
|
186
|
-
editor: Editor;
|
|
187
|
-
parent: ParentConfig<ExtensionConfig<Options, Storage>>['addProseMirrorPlugins'];
|
|
188
|
-
}) => Plugin[];
|
|
189
|
-
/**
|
|
190
|
-
* This function adds additional extensions to the editor. This is useful for
|
|
191
|
-
* building extension kits.
|
|
192
|
-
* @example
|
|
193
|
-
* addExtensions() {
|
|
194
|
-
* return [
|
|
195
|
-
* BulletList,
|
|
196
|
-
* OrderedList,
|
|
197
|
-
* ListItem
|
|
198
|
-
* ]
|
|
199
|
-
* }
|
|
200
|
-
*/
|
|
201
|
-
addExtensions?: (this: {
|
|
202
|
-
name: string;
|
|
203
|
-
options: Options;
|
|
204
|
-
storage: Storage;
|
|
205
|
-
parent: ParentConfig<ExtensionConfig<Options, Storage>>['addExtensions'];
|
|
206
|
-
}) => Extensions;
|
|
207
|
-
/**
|
|
208
|
-
* This function extends the schema of the node.
|
|
209
|
-
* @example
|
|
210
|
-
* extendNodeSchema() {
|
|
211
|
-
* return {
|
|
212
|
-
* group: 'inline',
|
|
213
|
-
* selectable: false,
|
|
214
|
-
* }
|
|
215
|
-
* }
|
|
216
|
-
*/
|
|
217
|
-
extendNodeSchema?: ((this: {
|
|
218
|
-
name: string;
|
|
219
|
-
options: Options;
|
|
220
|
-
storage: Storage;
|
|
221
|
-
parent: ParentConfig<ExtensionConfig<Options, Storage>>['extendNodeSchema'];
|
|
222
|
-
}, extension: Node) => Record<string, any>) | null;
|
|
223
|
-
/**
|
|
224
|
-
* This function extends the schema of the mark.
|
|
225
|
-
* @example
|
|
226
|
-
* extendMarkSchema() {
|
|
227
|
-
* return {
|
|
228
|
-
* group: 'inline',
|
|
229
|
-
* selectable: false,
|
|
230
|
-
* }
|
|
231
|
-
* }
|
|
232
|
-
*/
|
|
233
|
-
extendMarkSchema?: ((this: {
|
|
234
|
-
name: string;
|
|
235
|
-
options: Options;
|
|
236
|
-
storage: Storage;
|
|
237
|
-
parent: ParentConfig<ExtensionConfig<Options, Storage>>['extendMarkSchema'];
|
|
238
|
-
}, extension: Mark) => Record<string, any>) | null;
|
|
239
|
-
/**
|
|
240
|
-
* The editor is not ready yet.
|
|
241
|
-
*/
|
|
242
|
-
onBeforeCreate?: ((this: {
|
|
243
|
-
name: string;
|
|
244
|
-
options: Options;
|
|
245
|
-
storage: Storage;
|
|
246
|
-
editor: Editor;
|
|
247
|
-
parent: ParentConfig<ExtensionConfig<Options, Storage>>['onBeforeCreate'];
|
|
248
|
-
}) => void) | null;
|
|
249
|
-
/**
|
|
250
|
-
* The editor is ready.
|
|
251
|
-
*/
|
|
252
|
-
onCreate?: ((this: {
|
|
253
|
-
name: string;
|
|
254
|
-
options: Options;
|
|
255
|
-
storage: Storage;
|
|
256
|
-
editor: Editor;
|
|
257
|
-
parent: ParentConfig<ExtensionConfig<Options, Storage>>['onCreate'];
|
|
258
|
-
}) => void) | null;
|
|
259
|
-
/**
|
|
260
|
-
* The content has changed.
|
|
261
|
-
*/
|
|
262
|
-
onUpdate?: ((this: {
|
|
263
|
-
name: string;
|
|
264
|
-
options: Options;
|
|
265
|
-
storage: Storage;
|
|
266
|
-
editor: Editor;
|
|
267
|
-
parent: ParentConfig<ExtensionConfig<Options, Storage>>['onUpdate'];
|
|
268
|
-
}) => void) | null;
|
|
269
|
-
/**
|
|
270
|
-
* The selection has changed.
|
|
271
|
-
*/
|
|
272
|
-
onSelectionUpdate?: ((this: {
|
|
273
|
-
name: string;
|
|
274
|
-
options: Options;
|
|
275
|
-
storage: Storage;
|
|
276
|
-
editor: Editor;
|
|
277
|
-
parent: ParentConfig<ExtensionConfig<Options, Storage>>['onSelectionUpdate'];
|
|
278
|
-
}) => void) | null;
|
|
279
|
-
/**
|
|
280
|
-
* The editor state has changed.
|
|
281
|
-
*/
|
|
282
|
-
onTransaction?: ((this: {
|
|
283
|
-
name: string;
|
|
284
|
-
options: Options;
|
|
285
|
-
storage: Storage;
|
|
286
|
-
editor: Editor;
|
|
287
|
-
parent: ParentConfig<ExtensionConfig<Options, Storage>>['onTransaction'];
|
|
288
|
-
}, props: {
|
|
289
|
-
editor: Editor;
|
|
290
|
-
transaction: Transaction;
|
|
291
|
-
}) => void) | null;
|
|
292
|
-
/**
|
|
293
|
-
* The editor is focused.
|
|
294
|
-
*/
|
|
295
|
-
onFocus?: ((this: {
|
|
296
|
-
name: string;
|
|
297
|
-
options: Options;
|
|
298
|
-
storage: Storage;
|
|
299
|
-
editor: Editor;
|
|
300
|
-
parent: ParentConfig<ExtensionConfig<Options, Storage>>['onFocus'];
|
|
301
|
-
}, props: {
|
|
302
|
-
event: FocusEvent;
|
|
303
|
-
}) => void) | null;
|
|
304
|
-
/**
|
|
305
|
-
* The editor isn’t focused anymore.
|
|
306
|
-
*/
|
|
307
|
-
onBlur?: ((this: {
|
|
308
|
-
name: string;
|
|
309
|
-
options: Options;
|
|
310
|
-
storage: Storage;
|
|
311
|
-
editor: Editor;
|
|
312
|
-
parent: ParentConfig<ExtensionConfig<Options, Storage>>['onBlur'];
|
|
313
|
-
}, props: {
|
|
314
|
-
event: FocusEvent;
|
|
315
|
-
}) => void) | null;
|
|
316
|
-
/**
|
|
317
|
-
* The editor is destroyed.
|
|
318
|
-
*/
|
|
319
|
-
onDestroy?: ((this: {
|
|
320
|
-
name: string;
|
|
321
|
-
options: Options;
|
|
322
|
-
storage: Storage;
|
|
323
|
-
editor: Editor;
|
|
324
|
-
parent: ParentConfig<ExtensionConfig<Options, Storage>>['onDestroy'];
|
|
325
|
-
}) => void) | null;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
/**
|
|
329
|
-
* The Extension class is the base class for all extensions.
|
|
330
|
-
* @see https://tiptap.dev/api/extensions#create-a-new-extension
|
|
331
|
-
*/
|
|
332
|
-
export declare class Extension<Options = any, Storage = any> {
|
|
333
|
-
type: string;
|
|
334
|
-
name: string;
|
|
335
|
-
parent: Extension | null;
|
|
336
|
-
child: Extension | null;
|
|
337
|
-
options: Options;
|
|
338
|
-
storage: Storage;
|
|
339
|
-
config: ExtensionConfig;
|
|
340
|
-
constructor(config?: Partial<ExtensionConfig<Options, Storage>>);
|
|
341
|
-
static create<O = any, S = any>(config?: Partial<ExtensionConfig<O, S>>): Extension<O, S>;
|
|
342
|
-
configure(options?: Partial<Options>): Extension<Options, Storage>;
|
|
343
|
-
extend<ExtendedOptions = Options, ExtendedStorage = Storage>(extendedConfig?: Partial<ExtensionConfig<ExtendedOptions, ExtendedStorage>>): Extension<ExtendedOptions, ExtendedStorage>;
|
|
344
|
-
}
|