@tiptap/extension-superscript 2.6.2 → 3.0.0-next.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/dist/index.cjs +78 -57
- package/dist/index.cjs.map +1 -1
- package/dist/{packages/extension-superscript/src/superscript.d.ts → index.d.cts} +5 -2
- package/dist/index.d.ts +38 -0
- package/dist/index.js +53 -54
- package/dist/index.js.map +1 -1
- package/package.json +6 -8
- package/dist/index.umd.js +0 -65
- 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 -163
- 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 -55
- 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 -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 -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 -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 -14
- 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 -253
- 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-superscript/src/index.d.ts +0 -3
|
@@ -1,612 +0,0 @@
|
|
|
1
|
-
import { DOMOutputSpec, Node as ProseMirrorNode, NodeSpec, NodeType } from '@tiptap/pm/model';
|
|
2
|
-
import { Plugin, Transaction } from '@tiptap/pm/state';
|
|
3
|
-
import { Editor } from './Editor.js';
|
|
4
|
-
import { NodeConfig } from './index.js';
|
|
5
|
-
import { InputRule } from './InputRule.js';
|
|
6
|
-
import { Mark } from './Mark.js';
|
|
7
|
-
import { PasteRule } from './PasteRule.js';
|
|
8
|
-
import { Attributes, Extensions, GlobalAttributes, KeyboardShortcutCommand, NodeViewRenderer, ParentConfig, RawCommands } from './types.js';
|
|
9
|
-
declare module '@tiptap/core' {
|
|
10
|
-
interface NodeConfig<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/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<NodeConfig<Options, Storage>>['addOptions'], undefined>;
|
|
48
|
-
}) => Options;
|
|
49
|
-
/**
|
|
50
|
-
* The default storage this extension can save data to.
|
|
51
|
-
* @see https://tiptap.dev/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<NodeConfig<Options, Storage>>['addStorage'], undefined>;
|
|
62
|
-
}) => Storage;
|
|
63
|
-
/**
|
|
64
|
-
* This function adds globalAttributes to specific nodes.
|
|
65
|
-
* @see https://tiptap.dev/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<NodeConfig<Options, Storage>>['addGlobalAttributes'];
|
|
95
|
-
}) => GlobalAttributes;
|
|
96
|
-
/**
|
|
97
|
-
* This function adds commands to the editor
|
|
98
|
-
* @see https://tiptap.dev/guide/custom-extensions#keyboard-shortcuts
|
|
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
|
-
type: NodeType;
|
|
112
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['addCommands'];
|
|
113
|
-
}) => Partial<RawCommands>;
|
|
114
|
-
/**
|
|
115
|
-
* This function registers keyboard shortcuts.
|
|
116
|
-
* @see https://tiptap.dev/guide/custom-extensions#keyboard-shortcuts
|
|
117
|
-
* @example
|
|
118
|
-
* addKeyboardShortcuts() {
|
|
119
|
-
* return {
|
|
120
|
-
* 'Mod-l': () => this.editor.commands.toggleBulletList(),
|
|
121
|
-
* }
|
|
122
|
-
* },
|
|
123
|
-
*/
|
|
124
|
-
addKeyboardShortcuts?: (this: {
|
|
125
|
-
name: string;
|
|
126
|
-
options: Options;
|
|
127
|
-
storage: Storage;
|
|
128
|
-
editor: Editor;
|
|
129
|
-
type: NodeType;
|
|
130
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['addKeyboardShortcuts'];
|
|
131
|
-
}) => {
|
|
132
|
-
[key: string]: KeyboardShortcutCommand;
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* This function adds input rules to the editor.
|
|
136
|
-
* @see https://tiptap.dev/guide/custom-extensions#input-rules
|
|
137
|
-
* @example
|
|
138
|
-
* addInputRules() {
|
|
139
|
-
* return [
|
|
140
|
-
* markInputRule({
|
|
141
|
-
* find: inputRegex,
|
|
142
|
-
* type: this.type,
|
|
143
|
-
* }),
|
|
144
|
-
* ]
|
|
145
|
-
* },
|
|
146
|
-
*/
|
|
147
|
-
addInputRules?: (this: {
|
|
148
|
-
name: string;
|
|
149
|
-
options: Options;
|
|
150
|
-
storage: Storage;
|
|
151
|
-
editor: Editor;
|
|
152
|
-
type: NodeType;
|
|
153
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['addInputRules'];
|
|
154
|
-
}) => InputRule[];
|
|
155
|
-
/**
|
|
156
|
-
* This function adds paste rules to the editor.
|
|
157
|
-
* @see https://tiptap.dev/guide/custom-extensions#paste-rules
|
|
158
|
-
* @example
|
|
159
|
-
* addPasteRules() {
|
|
160
|
-
* return [
|
|
161
|
-
* markPasteRule({
|
|
162
|
-
* find: pasteRegex,
|
|
163
|
-
* type: this.type,
|
|
164
|
-
* }),
|
|
165
|
-
* ]
|
|
166
|
-
* },
|
|
167
|
-
*/
|
|
168
|
-
addPasteRules?: (this: {
|
|
169
|
-
name: string;
|
|
170
|
-
options: Options;
|
|
171
|
-
storage: Storage;
|
|
172
|
-
editor: Editor;
|
|
173
|
-
type: NodeType;
|
|
174
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['addPasteRules'];
|
|
175
|
-
}) => PasteRule[];
|
|
176
|
-
/**
|
|
177
|
-
* This function adds Prosemirror plugins to the editor
|
|
178
|
-
* @see https://tiptap.dev/guide/custom-extensions#prosemirror-plugins
|
|
179
|
-
* @example
|
|
180
|
-
* addProseMirrorPlugins() {
|
|
181
|
-
* return [
|
|
182
|
-
* customPlugin(),
|
|
183
|
-
* ]
|
|
184
|
-
* }
|
|
185
|
-
*/
|
|
186
|
-
addProseMirrorPlugins?: (this: {
|
|
187
|
-
name: string;
|
|
188
|
-
options: Options;
|
|
189
|
-
storage: Storage;
|
|
190
|
-
editor: Editor;
|
|
191
|
-
type: NodeType;
|
|
192
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['addProseMirrorPlugins'];
|
|
193
|
-
}) => Plugin[];
|
|
194
|
-
/**
|
|
195
|
-
* This function adds additional extensions to the editor. This is useful for
|
|
196
|
-
* building extension kits.
|
|
197
|
-
* @example
|
|
198
|
-
* addExtensions() {
|
|
199
|
-
* return [
|
|
200
|
-
* BulletList,
|
|
201
|
-
* OrderedList,
|
|
202
|
-
* ListItem
|
|
203
|
-
* ]
|
|
204
|
-
* }
|
|
205
|
-
*/
|
|
206
|
-
addExtensions?: (this: {
|
|
207
|
-
name: string;
|
|
208
|
-
options: Options;
|
|
209
|
-
storage: Storage;
|
|
210
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['addExtensions'];
|
|
211
|
-
}) => Extensions;
|
|
212
|
-
/**
|
|
213
|
-
* This function extends the schema of the node.
|
|
214
|
-
* @example
|
|
215
|
-
* extendNodeSchema() {
|
|
216
|
-
* return {
|
|
217
|
-
* group: 'inline',
|
|
218
|
-
* selectable: false,
|
|
219
|
-
* }
|
|
220
|
-
* }
|
|
221
|
-
*/
|
|
222
|
-
extendNodeSchema?: ((this: {
|
|
223
|
-
name: string;
|
|
224
|
-
options: Options;
|
|
225
|
-
storage: Storage;
|
|
226
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['extendNodeSchema'];
|
|
227
|
-
}, extension: Node) => Record<string, any>) | null;
|
|
228
|
-
/**
|
|
229
|
-
* This function extends the schema of the mark.
|
|
230
|
-
* @example
|
|
231
|
-
* extendMarkSchema() {
|
|
232
|
-
* return {
|
|
233
|
-
* group: 'inline',
|
|
234
|
-
* selectable: false,
|
|
235
|
-
* }
|
|
236
|
-
* }
|
|
237
|
-
*/
|
|
238
|
-
extendMarkSchema?: ((this: {
|
|
239
|
-
name: string;
|
|
240
|
-
options: Options;
|
|
241
|
-
storage: Storage;
|
|
242
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['extendMarkSchema'];
|
|
243
|
-
editor?: Editor;
|
|
244
|
-
}, extension: Node) => Record<string, any>) | null;
|
|
245
|
-
/**
|
|
246
|
-
* The editor is not ready yet.
|
|
247
|
-
*/
|
|
248
|
-
onBeforeCreate?: ((this: {
|
|
249
|
-
name: string;
|
|
250
|
-
options: Options;
|
|
251
|
-
storage: Storage;
|
|
252
|
-
editor: Editor;
|
|
253
|
-
type: NodeType;
|
|
254
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['onBeforeCreate'];
|
|
255
|
-
}) => void) | null;
|
|
256
|
-
/**
|
|
257
|
-
* The editor is ready.
|
|
258
|
-
*/
|
|
259
|
-
onCreate?: ((this: {
|
|
260
|
-
name: string;
|
|
261
|
-
options: Options;
|
|
262
|
-
storage: Storage;
|
|
263
|
-
editor: Editor;
|
|
264
|
-
type: NodeType;
|
|
265
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['onCreate'];
|
|
266
|
-
}) => void) | null;
|
|
267
|
-
/**
|
|
268
|
-
* The content has changed.
|
|
269
|
-
*/
|
|
270
|
-
onUpdate?: ((this: {
|
|
271
|
-
name: string;
|
|
272
|
-
options: Options;
|
|
273
|
-
storage: Storage;
|
|
274
|
-
editor: Editor;
|
|
275
|
-
type: NodeType;
|
|
276
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['onUpdate'];
|
|
277
|
-
}) => void) | null;
|
|
278
|
-
/**
|
|
279
|
-
* The selection has changed.
|
|
280
|
-
*/
|
|
281
|
-
onSelectionUpdate?: ((this: {
|
|
282
|
-
name: string;
|
|
283
|
-
options: Options;
|
|
284
|
-
storage: Storage;
|
|
285
|
-
editor: Editor;
|
|
286
|
-
type: NodeType;
|
|
287
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['onSelectionUpdate'];
|
|
288
|
-
}) => void) | null;
|
|
289
|
-
/**
|
|
290
|
-
* The editor state has changed.
|
|
291
|
-
*/
|
|
292
|
-
onTransaction?: ((this: {
|
|
293
|
-
name: string;
|
|
294
|
-
options: Options;
|
|
295
|
-
storage: Storage;
|
|
296
|
-
editor: Editor;
|
|
297
|
-
type: NodeType;
|
|
298
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['onTransaction'];
|
|
299
|
-
}, props: {
|
|
300
|
-
editor: Editor;
|
|
301
|
-
transaction: Transaction;
|
|
302
|
-
}) => void) | null;
|
|
303
|
-
/**
|
|
304
|
-
* The editor is focused.
|
|
305
|
-
*/
|
|
306
|
-
onFocus?: ((this: {
|
|
307
|
-
name: string;
|
|
308
|
-
options: Options;
|
|
309
|
-
storage: Storage;
|
|
310
|
-
editor: Editor;
|
|
311
|
-
type: NodeType;
|
|
312
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['onFocus'];
|
|
313
|
-
}, props: {
|
|
314
|
-
event: FocusEvent;
|
|
315
|
-
}) => void) | null;
|
|
316
|
-
/**
|
|
317
|
-
* The editor isn’t focused anymore.
|
|
318
|
-
*/
|
|
319
|
-
onBlur?: ((this: {
|
|
320
|
-
name: string;
|
|
321
|
-
options: Options;
|
|
322
|
-
storage: Storage;
|
|
323
|
-
editor: Editor;
|
|
324
|
-
type: NodeType;
|
|
325
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['onBlur'];
|
|
326
|
-
}, props: {
|
|
327
|
-
event: FocusEvent;
|
|
328
|
-
}) => void) | null;
|
|
329
|
-
/**
|
|
330
|
-
* The editor is destroyed.
|
|
331
|
-
*/
|
|
332
|
-
onDestroy?: ((this: {
|
|
333
|
-
name: string;
|
|
334
|
-
options: Options;
|
|
335
|
-
storage: Storage;
|
|
336
|
-
editor: Editor;
|
|
337
|
-
type: NodeType;
|
|
338
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['onDestroy'];
|
|
339
|
-
}) => void) | null;
|
|
340
|
-
/**
|
|
341
|
-
* Node View
|
|
342
|
-
*/
|
|
343
|
-
addNodeView?: ((this: {
|
|
344
|
-
name: string;
|
|
345
|
-
options: Options;
|
|
346
|
-
storage: Storage;
|
|
347
|
-
editor: Editor;
|
|
348
|
-
type: NodeType;
|
|
349
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['addNodeView'];
|
|
350
|
-
}) => NodeViewRenderer) | null;
|
|
351
|
-
/**
|
|
352
|
-
* Defines if this node should be a top level node (doc)
|
|
353
|
-
* @default false
|
|
354
|
-
* @example true
|
|
355
|
-
*/
|
|
356
|
-
topNode?: boolean;
|
|
357
|
-
/**
|
|
358
|
-
* The content expression for this node, as described in the [schema
|
|
359
|
-
* guide](/docs/guide/#schema.content_expressions). When not given,
|
|
360
|
-
* the node does not allow any content.
|
|
361
|
-
*
|
|
362
|
-
* You can read more about it on the Prosemirror documentation here
|
|
363
|
-
* @see https://prosemirror.net/docs/guide/#schema.content_expressions
|
|
364
|
-
* @default undefined
|
|
365
|
-
* @example content: 'block+'
|
|
366
|
-
* @example content: 'headline paragraph block*'
|
|
367
|
-
*/
|
|
368
|
-
content?: NodeSpec['content'] | ((this: {
|
|
369
|
-
name: string;
|
|
370
|
-
options: Options;
|
|
371
|
-
storage: Storage;
|
|
372
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['content'];
|
|
373
|
-
editor?: Editor;
|
|
374
|
-
}) => NodeSpec['content']);
|
|
375
|
-
/**
|
|
376
|
-
* The marks that are allowed inside of this node. May be a
|
|
377
|
-
* space-separated string referring to mark names or groups, `"_"`
|
|
378
|
-
* to explicitly allow all marks, or `""` to disallow marks. When
|
|
379
|
-
* not given, nodes with inline content default to allowing all
|
|
380
|
-
* marks, other nodes default to not allowing marks.
|
|
381
|
-
*
|
|
382
|
-
* @example marks: 'strong em'
|
|
383
|
-
*/
|
|
384
|
-
marks?: NodeSpec['marks'] | ((this: {
|
|
385
|
-
name: string;
|
|
386
|
-
options: Options;
|
|
387
|
-
storage: Storage;
|
|
388
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['marks'];
|
|
389
|
-
editor?: Editor;
|
|
390
|
-
}) => NodeSpec['marks']);
|
|
391
|
-
/**
|
|
392
|
-
* The group or space-separated groups to which this node belongs,
|
|
393
|
-
* which can be referred to in the content expressions for the
|
|
394
|
-
* schema.
|
|
395
|
-
*
|
|
396
|
-
* By default Tiptap uses the groups 'block' and 'inline' for nodes. You
|
|
397
|
-
* can also use custom groups if you want to group specific nodes together
|
|
398
|
-
* and handle them in your schema.
|
|
399
|
-
* @example group: 'block'
|
|
400
|
-
* @example group: 'inline'
|
|
401
|
-
* @example group: 'customBlock' // this uses a custom group
|
|
402
|
-
*/
|
|
403
|
-
group?: NodeSpec['group'] | ((this: {
|
|
404
|
-
name: string;
|
|
405
|
-
options: Options;
|
|
406
|
-
storage: Storage;
|
|
407
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['group'];
|
|
408
|
-
editor?: Editor;
|
|
409
|
-
}) => NodeSpec['group']);
|
|
410
|
-
/**
|
|
411
|
-
* Should be set to true for inline nodes. (Implied for text nodes.)
|
|
412
|
-
*/
|
|
413
|
-
inline?: NodeSpec['inline'] | ((this: {
|
|
414
|
-
name: string;
|
|
415
|
-
options: Options;
|
|
416
|
-
storage: Storage;
|
|
417
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['inline'];
|
|
418
|
-
editor?: Editor;
|
|
419
|
-
}) => NodeSpec['inline']);
|
|
420
|
-
/**
|
|
421
|
-
* Can be set to true to indicate that, though this isn't a [leaf
|
|
422
|
-
* node](https://prosemirror.net/docs/ref/#model.NodeType.isLeaf), it doesn't have directly editable
|
|
423
|
-
* content and should be treated as a single unit in the view.
|
|
424
|
-
*
|
|
425
|
-
* @example atom: true
|
|
426
|
-
*/
|
|
427
|
-
atom?: NodeSpec['atom'] | ((this: {
|
|
428
|
-
name: string;
|
|
429
|
-
options: Options;
|
|
430
|
-
storage: Storage;
|
|
431
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['atom'];
|
|
432
|
-
editor?: Editor;
|
|
433
|
-
}) => NodeSpec['atom']);
|
|
434
|
-
/**
|
|
435
|
-
* Controls whether nodes of this type can be selected as a [node
|
|
436
|
-
* selection](https://prosemirror.net/docs/ref/#state.NodeSelection). Defaults to true for non-text
|
|
437
|
-
* nodes.
|
|
438
|
-
*
|
|
439
|
-
* @default true
|
|
440
|
-
* @example selectable: false
|
|
441
|
-
*/
|
|
442
|
-
selectable?: NodeSpec['selectable'] | ((this: {
|
|
443
|
-
name: string;
|
|
444
|
-
options: Options;
|
|
445
|
-
storage: Storage;
|
|
446
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['selectable'];
|
|
447
|
-
editor?: Editor;
|
|
448
|
-
}) => NodeSpec['selectable']);
|
|
449
|
-
/**
|
|
450
|
-
* Determines whether nodes of this type can be dragged without
|
|
451
|
-
* being selected. Defaults to false.
|
|
452
|
-
*
|
|
453
|
-
* @default: false
|
|
454
|
-
* @example: draggable: true
|
|
455
|
-
*/
|
|
456
|
-
draggable?: NodeSpec['draggable'] | ((this: {
|
|
457
|
-
name: string;
|
|
458
|
-
options: Options;
|
|
459
|
-
storage: Storage;
|
|
460
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['draggable'];
|
|
461
|
-
editor?: Editor;
|
|
462
|
-
}) => NodeSpec['draggable']);
|
|
463
|
-
/**
|
|
464
|
-
* Can be used to indicate that this node contains code, which
|
|
465
|
-
* causes some commands to behave differently.
|
|
466
|
-
*/
|
|
467
|
-
code?: NodeSpec['code'] | ((this: {
|
|
468
|
-
name: string;
|
|
469
|
-
options: Options;
|
|
470
|
-
storage: Storage;
|
|
471
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['code'];
|
|
472
|
-
editor?: Editor;
|
|
473
|
-
}) => NodeSpec['code']);
|
|
474
|
-
/**
|
|
475
|
-
* Controls way whitespace in this a node is parsed. The default is
|
|
476
|
-
* `"normal"`, which causes the [DOM parser](https://prosemirror.net/docs/ref/#model.DOMParser) to
|
|
477
|
-
* collapse whitespace in normal mode, and normalize it (replacing
|
|
478
|
-
* newlines and such with spaces) otherwise. `"pre"` causes the
|
|
479
|
-
* parser to preserve spaces inside the node. When this option isn't
|
|
480
|
-
* given, but [`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) is true, `whitespace`
|
|
481
|
-
* will default to `"pre"`. Note that this option doesn't influence
|
|
482
|
-
* the way the node is rendered—that should be handled by `toDOM`
|
|
483
|
-
* and/or styling.
|
|
484
|
-
*/
|
|
485
|
-
whitespace?: NodeSpec['whitespace'] | ((this: {
|
|
486
|
-
name: string;
|
|
487
|
-
options: Options;
|
|
488
|
-
storage: Storage;
|
|
489
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['whitespace'];
|
|
490
|
-
editor?: Editor;
|
|
491
|
-
}) => NodeSpec['whitespace']);
|
|
492
|
-
/**
|
|
493
|
-
* When enabled, enables both
|
|
494
|
-
* [`definingAsContext`](https://prosemirror.net/docs/ref/#model.NodeSpec.definingAsContext) and
|
|
495
|
-
* [`definingForContent`](https://prosemirror.net/docs/ref/#model.NodeSpec.definingForContent).
|
|
496
|
-
*
|
|
497
|
-
* @default false
|
|
498
|
-
* @example isolating: true
|
|
499
|
-
*/
|
|
500
|
-
defining?: NodeSpec['defining'] | ((this: {
|
|
501
|
-
name: string;
|
|
502
|
-
options: Options;
|
|
503
|
-
storage: Storage;
|
|
504
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['defining'];
|
|
505
|
-
editor?: Editor;
|
|
506
|
-
}) => NodeSpec['defining']);
|
|
507
|
-
/**
|
|
508
|
-
* When enabled (default is false), the sides of nodes of this type
|
|
509
|
-
* count as boundaries that regular editing operations, like
|
|
510
|
-
* backspacing or lifting, won't cross. An example of a node that
|
|
511
|
-
* should probably have this enabled is a table cell.
|
|
512
|
-
*/
|
|
513
|
-
isolating?: NodeSpec['isolating'] | ((this: {
|
|
514
|
-
name: string;
|
|
515
|
-
options: Options;
|
|
516
|
-
storage: Storage;
|
|
517
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['isolating'];
|
|
518
|
-
editor?: Editor;
|
|
519
|
-
}) => NodeSpec['isolating']);
|
|
520
|
-
/**
|
|
521
|
-
* Associates DOM parser information with this node, which can be
|
|
522
|
-
* used by [`DOMParser.fromSchema`](https://prosemirror.net/docs/ref/#model.DOMParser^fromSchema) to
|
|
523
|
-
* automatically derive a parser. The `node` field in the rules is
|
|
524
|
-
* implied (the name of this node will be filled in automatically).
|
|
525
|
-
* If you supply your own parser, you do not need to also specify
|
|
526
|
-
* parsing rules in your schema.
|
|
527
|
-
*
|
|
528
|
-
* @example parseHTML: [{ tag: 'div', attrs: { 'data-id': 'my-block' } }]
|
|
529
|
-
*/
|
|
530
|
-
parseHTML?: (this: {
|
|
531
|
-
name: string;
|
|
532
|
-
options: Options;
|
|
533
|
-
storage: Storage;
|
|
534
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['parseHTML'];
|
|
535
|
-
editor?: Editor;
|
|
536
|
-
}) => NodeSpec['parseDOM'];
|
|
537
|
-
/**
|
|
538
|
-
* A description of a DOM structure. Can be either a string, which is
|
|
539
|
-
* interpreted as a text node, a DOM node, which is interpreted as
|
|
540
|
-
* itself, a `{dom, contentDOM}` object, or an array.
|
|
541
|
-
*
|
|
542
|
-
* An array describes a DOM element. The first value in the array
|
|
543
|
-
* should be a string—the name of the DOM element, optionally prefixed
|
|
544
|
-
* by a namespace URL and a space. If the second element is plain
|
|
545
|
-
* object, it is interpreted as a set of attributes for the element.
|
|
546
|
-
* Any elements after that (including the 2nd if it's not an attribute
|
|
547
|
-
* object) are interpreted as children of the DOM elements, and must
|
|
548
|
-
* either be valid `DOMOutputSpec` values, or the number zero.
|
|
549
|
-
*
|
|
550
|
-
* The number zero (pronounced “hole”) is used to indicate the place
|
|
551
|
-
* where a node's child nodes should be inserted. If it occurs in an
|
|
552
|
-
* output spec, it should be the only child element in its parent
|
|
553
|
-
* node.
|
|
554
|
-
*
|
|
555
|
-
* @example toDOM: ['div[data-id="my-block"]', { class: 'my-block' }, 0]
|
|
556
|
-
*/
|
|
557
|
-
renderHTML?: ((this: {
|
|
558
|
-
name: string;
|
|
559
|
-
options: Options;
|
|
560
|
-
storage: Storage;
|
|
561
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['renderHTML'];
|
|
562
|
-
editor?: Editor;
|
|
563
|
-
}, props: {
|
|
564
|
-
node: ProseMirrorNode;
|
|
565
|
-
HTMLAttributes: Record<string, any>;
|
|
566
|
-
}) => DOMOutputSpec) | null;
|
|
567
|
-
/**
|
|
568
|
-
* renders the node as text
|
|
569
|
-
* @example renderText: () => 'foo
|
|
570
|
-
*/
|
|
571
|
-
renderText?: ((this: {
|
|
572
|
-
name: string;
|
|
573
|
-
options: Options;
|
|
574
|
-
storage: Storage;
|
|
575
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['renderText'];
|
|
576
|
-
editor?: Editor;
|
|
577
|
-
}, props: {
|
|
578
|
-
node: ProseMirrorNode;
|
|
579
|
-
pos: number;
|
|
580
|
-
parent: ProseMirrorNode;
|
|
581
|
-
index: number;
|
|
582
|
-
}) => string) | null;
|
|
583
|
-
/**
|
|
584
|
-
* Add attributes to the node
|
|
585
|
-
* @example addAttributes: () => ({ class: 'foo' })
|
|
586
|
-
*/
|
|
587
|
-
addAttributes?: (this: {
|
|
588
|
-
name: string;
|
|
589
|
-
options: Options;
|
|
590
|
-
storage: Storage;
|
|
591
|
-
parent: ParentConfig<NodeConfig<Options, Storage>>['addAttributes'];
|
|
592
|
-
editor?: Editor;
|
|
593
|
-
}) => Attributes | {};
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
/**
|
|
597
|
-
* The Node class is used to create custom node extensions.
|
|
598
|
-
* @see https://tiptap.dev/api/extensions#create-a-new-extension
|
|
599
|
-
*/
|
|
600
|
-
export declare class Node<Options = any, Storage = any> {
|
|
601
|
-
type: string;
|
|
602
|
-
name: string;
|
|
603
|
-
parent: Node | null;
|
|
604
|
-
child: Node | null;
|
|
605
|
-
options: Options;
|
|
606
|
-
storage: Storage;
|
|
607
|
-
config: NodeConfig;
|
|
608
|
-
constructor(config?: Partial<NodeConfig<Options, Storage>>);
|
|
609
|
-
static create<O = any, S = any>(config?: Partial<NodeConfig<O, S>>): Node<O, S>;
|
|
610
|
-
configure(options?: Partial<Options>): Node<Options, Storage>;
|
|
611
|
-
extend<ExtendedOptions = Options, ExtendedStorage = Storage>(extendedConfig?: Partial<NodeConfig<ExtendedOptions, ExtendedStorage>>): Node<ExtendedOptions, ExtendedStorage>;
|
|
612
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Fragment, Node, ResolvedPos } from '@tiptap/pm/model';
|
|
2
|
-
import { Editor } from './Editor.js';
|
|
3
|
-
import { Content, Range } from './types.js';
|
|
4
|
-
export declare class NodePos {
|
|
5
|
-
private resolvedPos;
|
|
6
|
-
private isBlock;
|
|
7
|
-
private editor;
|
|
8
|
-
private get name();
|
|
9
|
-
constructor(pos: ResolvedPos, editor: Editor, isBlock?: boolean, node?: Node | null);
|
|
10
|
-
private currentNode;
|
|
11
|
-
get node(): Node;
|
|
12
|
-
get element(): HTMLElement;
|
|
13
|
-
actualDepth: number | null;
|
|
14
|
-
get depth(): number;
|
|
15
|
-
get pos(): number;
|
|
16
|
-
get content(): Fragment;
|
|
17
|
-
set content(content: Content);
|
|
18
|
-
get attributes(): {
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
};
|
|
21
|
-
get textContent(): string;
|
|
22
|
-
get size(): number;
|
|
23
|
-
get from(): number;
|
|
24
|
-
get range(): Range;
|
|
25
|
-
get to(): number;
|
|
26
|
-
get parent(): NodePos | null;
|
|
27
|
-
get before(): NodePos | null;
|
|
28
|
-
get after(): NodePos | null;
|
|
29
|
-
get children(): NodePos[];
|
|
30
|
-
get firstChild(): NodePos | null;
|
|
31
|
-
get lastChild(): NodePos | null;
|
|
32
|
-
closest(selector: string, attributes?: {
|
|
33
|
-
[key: string]: any;
|
|
34
|
-
}): NodePos | null;
|
|
35
|
-
querySelector(selector: string, attributes?: {
|
|
36
|
-
[key: string]: any;
|
|
37
|
-
}): NodePos | null;
|
|
38
|
-
querySelectorAll(selector: string, attributes?: {
|
|
39
|
-
[key: string]: any;
|
|
40
|
-
}, firstItemOnly?: boolean): NodePos[];
|
|
41
|
-
setAttribute(attributes: {
|
|
42
|
-
[key: string]: any;
|
|
43
|
-
}): void;
|
|
44
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Node as ProseMirrorNode } from '@tiptap/pm/model';
|
|
2
|
-
import { NodeView as ProseMirrorNodeView } from '@tiptap/pm/view';
|
|
3
|
-
import { Editor as CoreEditor } from './Editor.js';
|
|
4
|
-
import { Node } from './Node.js';
|
|
5
|
-
import { DecorationWithType, NodeViewRendererOptions, NodeViewRendererProps } from './types.js';
|
|
6
|
-
/**
|
|
7
|
-
* Node views are used to customize the rendered DOM structure of a node.
|
|
8
|
-
* @see https://tiptap.dev/guide/node-views
|
|
9
|
-
*/
|
|
10
|
-
export declare class NodeView<Component, NodeEditor extends CoreEditor = CoreEditor, Options extends NodeViewRendererOptions = NodeViewRendererOptions> implements ProseMirrorNodeView {
|
|
11
|
-
component: Component;
|
|
12
|
-
editor: NodeEditor;
|
|
13
|
-
options: Options;
|
|
14
|
-
extension: Node;
|
|
15
|
-
node: ProseMirrorNode;
|
|
16
|
-
decorations: DecorationWithType[];
|
|
17
|
-
getPos: any;
|
|
18
|
-
isDragging: boolean;
|
|
19
|
-
constructor(component: Component, props: NodeViewRendererProps, options?: Partial<Options>);
|
|
20
|
-
mount(): void;
|
|
21
|
-
get dom(): HTMLElement;
|
|
22
|
-
get contentDOM(): HTMLElement | null;
|
|
23
|
-
onDragStart(event: DragEvent): void;
|
|
24
|
-
stopEvent(event: Event): boolean;
|
|
25
|
-
ignoreMutation(mutation: MutationRecord | {
|
|
26
|
-
type: 'selection';
|
|
27
|
-
target: Element;
|
|
28
|
-
}): boolean;
|
|
29
|
-
updateAttributes(attributes: {}): void;
|
|
30
|
-
deleteNode(): void;
|
|
31
|
-
}
|