reactjs-tiptap-editor 0.2.29 → 0.3.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/lib/ActionMenuButton-Bycn676n.js +33 -0
- package/lib/ActionMenuButton-CpFNwSUZ.cjs +1 -0
- package/lib/Attachment.cjs +19 -0
- package/lib/Attachment.d.cts +344 -0
- package/lib/Attachment.d.ts +344 -0
- package/lib/Attachment.js +259 -0
- package/lib/Blockquote.cjs +1 -0
- package/lib/Blockquote.d.cts +343 -0
- package/lib/Blockquote.d.ts +343 -0
- package/lib/Blockquote.js +65 -0
- package/lib/Bold.cjs +1 -0
- package/lib/Bold.d.cts +343 -0
- package/lib/Bold.d.ts +343 -0
- package/lib/Bold.js +90 -0
- package/lib/BulletList.cjs +1 -0
- package/lib/BulletList.d.cts +343 -0
- package/lib/BulletList.d.ts +343 -0
- package/lib/BulletList.js +72 -0
- package/lib/Clear.cjs +1 -0
- package/lib/Clear.d.cts +342 -0
- package/lib/Clear.d.ts +342 -0
- package/lib/Clear.js +23 -0
- package/lib/Code.cjs +1 -0
- package/lib/Code.d.cts +343 -0
- package/lib/Code.d.ts +343 -0
- package/lib/Code.js +70 -0
- package/lib/CodeBlock.cjs +39 -0
- package/lib/CodeBlock.d.cts +352 -0
- package/lib/CodeBlock.d.ts +352 -0
- package/lib/CodeBlock.js +3639 -0
- package/lib/Color.cjs +1 -0
- package/lib/Color.d.cts +350 -0
- package/lib/Color.d.ts +350 -0
- package/lib/Color.js +141 -0
- package/lib/Document.cjs +1 -0
- package/lib/Document.d.cts +272 -0
- package/lib/Document.d.ts +272 -0
- package/lib/Document.js +13 -0
- package/lib/Drawer-BZadE1gM.js +1367 -0
- package/lib/Drawer-rwnFvgZR.cjs +1 -0
- package/lib/Drawer.cjs +1 -0
- package/lib/Drawer.d.cts +344 -0
- package/lib/Drawer.d.ts +344 -0
- package/lib/Drawer.js +7 -0
- package/lib/Emoji.cjs +1 -0
- package/lib/Emoji.d.cts +277 -0
- package/lib/Emoji.d.ts +277 -0
- package/lib/Emoji.js +2168 -0
- package/lib/Excalidraw-B2414Smc.js +651 -0
- package/lib/Excalidraw-D21vMFe0.cjs +1 -0
- package/lib/Excalidraw.cjs +1 -0
- package/lib/Excalidraw.d.cts +278 -0
- package/lib/Excalidraw.d.ts +278 -0
- package/lib/Excalidraw.js +6 -0
- package/lib/ExportPdf.cjs +15 -0
- package/lib/ExportPdf.d.cts +270 -0
- package/lib/ExportPdf.d.ts +270 -0
- package/lib/ExportPdf.js +67 -0
- package/lib/ExportWord.cjs +1 -0
- package/lib/ExportWord.d.cts +341 -0
- package/lib/ExportWord.d.ts +341 -0
- package/lib/ExportWord.js +72 -0
- package/lib/FontFamily.cjs +1 -0
- package/lib/FontFamily.d.cts +354 -0
- package/lib/FontFamily.d.ts +354 -0
- package/lib/FontFamily.js +136 -0
- package/lib/FontSize.cjs +1 -0
- package/lib/FontSize.d.cts +359 -0
- package/lib/FontSize.d.ts +359 -0
- package/lib/FontSize.js +110 -0
- package/lib/FormatPainter.cjs +1 -0
- package/lib/FormatPainter.d.cts +353 -0
- package/lib/FormatPainter.d.ts +353 -0
- package/lib/FormatPainter.js +74 -0
- package/lib/Heading.cjs +1 -0
- package/lib/Heading.d.cts +343 -0
- package/lib/Heading.d.ts +343 -0
- package/lib/Heading.js +147 -0
- package/lib/Highlight.cjs +1 -0
- package/lib/Highlight.d.cts +344 -0
- package/lib/Highlight.d.ts +344 -0
- package/lib/Highlight.js +85 -0
- package/lib/History.cjs +1 -0
- package/lib/History.d.cts +343 -0
- package/lib/History.d.ts +343 -0
- package/lib/History.js +431 -0
- package/lib/HorizontalRule.cjs +1 -0
- package/lib/HorizontalRule.d.cts +343 -0
- package/lib/HorizontalRule.d.ts +343 -0
- package/lib/HorizontalRule.js +87 -0
- package/lib/Iframe.cjs +1 -0
- package/lib/Iframe.d.cts +277 -0
- package/lib/Iframe.d.ts +277 -0
- package/lib/Iframe.js +6 -0
- package/lib/Image.cjs +1 -0
- package/lib/Image.d.cts +370 -0
- package/lib/Image.d.ts +370 -0
- package/lib/Image.js +7 -0
- package/lib/ImageGif.cjs +1 -0
- package/lib/ImageGif.d.cts +292 -0
- package/lib/ImageGif.d.ts +292 -0
- package/lib/ImageGif.js +7 -0
- package/lib/ImportWord.cjs +231 -0
- package/lib/ImportWord.d.cts +353 -0
- package/lib/ImportWord.d.ts +353 -0
- package/lib/ImportWord.js +16620 -0
- package/lib/Indent.cjs +1 -0
- package/lib/Indent.d.cts +344 -0
- package/lib/Indent.d.ts +344 -0
- package/lib/Indent.js +78 -0
- package/lib/Italic.cjs +1 -0
- package/lib/Italic.d.cts +343 -0
- package/lib/Italic.d.ts +343 -0
- package/lib/Italic.js +91 -0
- package/lib/Katex.cjs +1 -0
- package/lib/Katex.d.cts +279 -0
- package/lib/Katex.d.ts +279 -0
- package/lib/Katex.js +197 -0
- package/lib/LineHeight.cjs +1 -0
- package/lib/LineHeight.d.cts +347 -0
- package/lib/LineHeight.d.ts +347 -0
- package/lib/LineHeight.js +137 -0
- package/lib/Link.cjs +5 -0
- package/lib/Link.d.cts +343 -0
- package/lib/Link.d.ts +343 -0
- package/lib/Link.js +1048 -0
- package/lib/ListItem.cjs +1 -0
- package/lib/ListItem.d.cts +269 -0
- package/lib/ListItem.d.ts +269 -0
- package/lib/ListItem.js +33 -0
- package/lib/Mention.cjs +1 -0
- package/lib/Mention.d.cts +272 -0
- package/lib/Mention.d.ts +272 -0
- package/lib/Mention.js +233 -0
- package/lib/Mermaid.cjs +2 -0
- package/lib/Mermaid.d.cts +344 -0
- package/lib/Mermaid.d.ts +344 -0
- package/lib/Mermaid.js +390 -0
- package/lib/MoreMark.cjs +1 -0
- package/lib/MoreMark.d.cts +355 -0
- package/lib/MoreMark.d.ts +355 -0
- package/lib/MoreMark.js +95 -0
- package/lib/MultiColumn.cjs +1 -0
- package/lib/MultiColumn.d.cts +277 -0
- package/lib/MultiColumn.d.ts +277 -0
- package/lib/MultiColumn.js +8 -0
- package/lib/OrderedList.cjs +1 -0
- package/lib/OrderedList.d.cts +343 -0
- package/lib/OrderedList.d.ts +343 -0
- package/lib/OrderedList.js +90 -0
- package/lib/RichTextEditor-Cy9XKEI5.js +11178 -0
- package/lib/RichTextEditor-DkpDEr5U.cjs +137 -0
- package/lib/SearchAndReplace.cjs +1 -0
- package/lib/SearchAndReplace.d.cts +358 -0
- package/lib/SearchAndReplace.d.ts +358 -0
- package/lib/SearchAndReplace.js +339 -0
- package/lib/Selection.cjs +1 -0
- package/lib/Selection.d.cts +272 -0
- package/lib/Selection.d.ts +272 -0
- package/lib/Selection.js +25 -0
- package/lib/SlashCommand.cjs +1 -0
- package/lib/SlashCommand.d.cts +299 -0
- package/lib/SlashCommand.d.ts +299 -0
- package/lib/SlashCommand.js +369 -0
- package/lib/Strike.cjs +1 -0
- package/lib/Strike.d.cts +343 -0
- package/lib/Strike.d.ts +343 -0
- package/lib/Strike.js +80 -0
- package/lib/SubAndSuperScript.cjs +1 -0
- package/lib/SubAndSuperScript.d.cts +358 -0
- package/lib/SubAndSuperScript.d.ts +358 -0
- package/lib/SubAndSuperScript.js +41 -0
- package/lib/Table.cjs +1 -0
- package/lib/Table.d.cts +366 -0
- package/lib/Table.d.ts +366 -0
- package/lib/Table.js +2165 -0
- package/lib/TableOfContent.cjs +1 -0
- package/lib/TableOfContent.d.cts +274 -0
- package/lib/TableOfContent.d.ts +274 -0
- package/lib/TableOfContent.js +184 -0
- package/lib/TaskList.cjs +1 -0
- package/lib/TaskList.d.cts +349 -0
- package/lib/TaskList.d.ts +349 -0
- package/lib/TaskList.js +175 -0
- package/lib/TextAlign.cjs +1 -0
- package/lib/TextAlign.d.cts +353 -0
- package/lib/TextAlign.d.ts +353 -0
- package/lib/TextAlign.js +165 -0
- package/lib/TextBubble.cjs +1 -0
- package/lib/TextBubble.d.cts +343 -0
- package/lib/TextBubble.d.ts +343 -0
- package/lib/TextBubble.js +131 -0
- package/lib/TextDirection.cjs +1 -0
- package/lib/TextDirection.d.cts +270 -0
- package/lib/TextDirection.d.ts +270 -0
- package/lib/TextDirection.js +142 -0
- package/lib/TextUnderline.cjs +1 -0
- package/lib/TextUnderline.d.cts +343 -0
- package/lib/TextUnderline.d.ts +343 -0
- package/lib/TextUnderline.js +61 -0
- package/lib/TrailingNode.cjs +1 -0
- package/lib/TrailingNode.d.cts +280 -0
- package/lib/TrailingNode.d.ts +280 -0
- package/lib/TrailingNode.js +41 -0
- package/lib/Twitter-B_tSItrW.js +1743 -0
- package/lib/Twitter-CfDC4bFV.cjs +17 -0
- package/lib/Twitter.cjs +1 -0
- package/lib/Twitter.d.cts +295 -0
- package/lib/Twitter.d.ts +295 -0
- package/lib/Twitter.js +6 -0
- package/lib/Video.cjs +1 -0
- package/lib/Video.d.cts +371 -0
- package/lib/Video.d.ts +371 -0
- package/lib/Video.js +6 -0
- package/lib/bubble-extra.cjs +2 -0
- package/lib/bubble-extra.d.cts +294 -0
- package/lib/bubble-extra.d.ts +294 -0
- package/lib/bubble-extra.js +623 -0
- package/lib/dom-dataset-CAXnsjYE.cjs +33 -0
- package/lib/dom-dataset-CJ7GyQ2E.js +999 -0
- package/lib/index-COecBbaE.cjs +89 -0
- package/lib/index-ClFtfQ0J.cjs +1 -0
- package/lib/index-CvYIX2-x.js +129 -0
- package/lib/index-CySbCeQd.cjs +1 -0
- package/lib/{index-CO-iymkb.js → index-D9llIWB5.js} +442 -101
- package/lib/index-DXBa3JBo.js +46 -0
- package/lib/index-DjP7Onch.cjs +1 -0
- package/lib/index-Drmyqk9P.js +12322 -0
- package/lib/index-DuhDIOel.js +76 -0
- package/lib/index-LbrE7K9i.cjs +1 -0
- package/lib/index.cjs +2 -1
- package/lib/index.d.cts +290 -108
- package/lib/index.d.ts +290 -108
- package/lib/index.js +587 -13
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.cts +108 -108
- package/lib/locale-bundle.d.ts +108 -108
- package/lib/locale-bundle.js +1 -1
- package/lib/shortId-Bfj8TyNr.cjs +2 -0
- package/lib/shortId-WJVkrvml.js +30 -0
- package/lib/style.css +1 -1
- package/lib/textarea-B45fP3gP.cjs +1 -0
- package/lib/textarea-DXTdXr2y.js +20 -0
- package/package.json +678 -15
- package/lib/RichTextEditor-Ce2IeNE6.js +0 -8265
- package/lib/RichTextEditor-hDDApaDD.cjs +0 -136
- package/lib/extension-bundle.cjs +0 -33
- package/lib/extension-bundle.d.cts +0 -951
- package/lib/extension-bundle.d.ts +0 -951
- package/lib/extension-bundle.js +0 -5982
- package/lib/index-CJ6Hb9MN.cjs +0 -1
- package/lib/tiptap-DOP8lVCQ.js +0 -5950
- package/lib/tiptap-Dq62HiQ9.cjs +0 -113
- package/lib/vendor-BbgkyoD-.js +0 -40297
- package/lib/vendor-DdwtMmSr.cjs +0 -302
package/lib/index.d.cts
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { AnyExtension } from '@tiptap/core';
|
|
2
2
|
import { BubbleMenu } from '@tiptap/react';
|
|
3
|
+
import { CharacterCountOptions } from '@tiptap/extension-character-count';
|
|
3
4
|
import { default as default_2 } from 'react';
|
|
5
|
+
import { DropcursorOptions } from '@tiptap/extension-dropcursor';
|
|
4
6
|
import { Editor } from '@tiptap/react';
|
|
5
7
|
import { Editor as Editor_2 } from '@tiptap/core';
|
|
8
|
+
import { Extension } from '@tiptap/core';
|
|
9
|
+
import { FocusOptions as FocusOptions_2 } from '@tiptap/extension-focus';
|
|
6
10
|
import { ForwardRefExoticComponent } from 'react';
|
|
11
|
+
import { HardBreakOptions } from '@tiptap/extension-hard-break';
|
|
12
|
+
import { ListItemOptions } from '@tiptap/extension-list-item';
|
|
13
|
+
import { ParagraphOptions } from '@tiptap/extension-paragraph';
|
|
14
|
+
import { PlaceholderOptions } from '@tiptap/extension-placeholder';
|
|
7
15
|
import { RefAttributes } from 'react';
|
|
16
|
+
import { TextStyleOptions } from '@tiptap/extension-text-style';
|
|
8
17
|
import { TooltipContentProps } from '@radix-ui/react-tooltip';
|
|
9
18
|
import { UseEditorOptions } from '@tiptap/react';
|
|
10
19
|
|
|
@@ -25,6 +34,113 @@ declare interface ActionButtonProps {
|
|
|
25
34
|
upload?: boolean;
|
|
26
35
|
}
|
|
27
36
|
|
|
37
|
+
export declare const BaseKit: Extension<BaseKitOptions, any>;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Represents the interface for options in the base toolkit.
|
|
41
|
+
*/
|
|
42
|
+
export declare interface BaseKitOptions {
|
|
43
|
+
/**
|
|
44
|
+
* Whether to enable the document option
|
|
45
|
+
*
|
|
46
|
+
* @default true
|
|
47
|
+
*/
|
|
48
|
+
document: false;
|
|
49
|
+
/**
|
|
50
|
+
* Whether to enable the document option
|
|
51
|
+
*
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
54
|
+
multiColumn?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Whether to enable the text option
|
|
57
|
+
*
|
|
58
|
+
* @default true
|
|
59
|
+
*/
|
|
60
|
+
text: false;
|
|
61
|
+
/**
|
|
62
|
+
* Whether to enable the Gapcursor
|
|
63
|
+
*
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
66
|
+
gapcursor: false;
|
|
67
|
+
/**
|
|
68
|
+
* Dropcursor options or false, indicating whether to enable the drop cursor
|
|
69
|
+
*
|
|
70
|
+
* @default true
|
|
71
|
+
*/
|
|
72
|
+
dropcursor: Partial<DropcursorOptions> | false;
|
|
73
|
+
/**
|
|
74
|
+
* character count options or false, indicating whether to enable character count
|
|
75
|
+
*
|
|
76
|
+
* @default true
|
|
77
|
+
*/
|
|
78
|
+
characterCount: Partial<CharacterCountOptions> | false;
|
|
79
|
+
/**
|
|
80
|
+
* HardBreak options or false, indicating whether to enable hard breaks
|
|
81
|
+
*
|
|
82
|
+
* @default true
|
|
83
|
+
*/
|
|
84
|
+
hardBreak: Partial<HardBreakOptions> | false;
|
|
85
|
+
/**
|
|
86
|
+
* Placeholder options or false, indicating whether to enable placeholders
|
|
87
|
+
*
|
|
88
|
+
* @default true
|
|
89
|
+
*/
|
|
90
|
+
placeholder: Partial<PlaceholderOptions> | false;
|
|
91
|
+
/**
|
|
92
|
+
* Paragraph options or false, indicating whether to enable paragraph functionality
|
|
93
|
+
*
|
|
94
|
+
* @default true
|
|
95
|
+
*/
|
|
96
|
+
paragraph: Partial<ParagraphOptions> | false;
|
|
97
|
+
/**
|
|
98
|
+
* Focus options or false, indicating whether to enable focus functionality
|
|
99
|
+
*
|
|
100
|
+
* @default true
|
|
101
|
+
*/
|
|
102
|
+
focus: Partial<FocusOptions_2> | false;
|
|
103
|
+
/**
|
|
104
|
+
* ListItem options or false, indicating whether to enable list item functionality
|
|
105
|
+
*
|
|
106
|
+
* @default true
|
|
107
|
+
*/
|
|
108
|
+
listItem: Partial<ListItemOptions> | false;
|
|
109
|
+
/**
|
|
110
|
+
* Text Style options or false, indicating whether to enable text style functionality
|
|
111
|
+
*
|
|
112
|
+
* @default true
|
|
113
|
+
*/
|
|
114
|
+
textStyle: Partial<TextStyleOptions> | false;
|
|
115
|
+
/**
|
|
116
|
+
* Bubble options, taking `BubbleOptions<BaseKitOptions>` as parameters, indicating whether to enable the bubble functionality
|
|
117
|
+
*/
|
|
118
|
+
bubble: any;
|
|
119
|
+
/**
|
|
120
|
+
* Iframe options or false, indicating whether to enable the iframe
|
|
121
|
+
*
|
|
122
|
+
* @default true
|
|
123
|
+
*/
|
|
124
|
+
/**
|
|
125
|
+
* Trailing node options or false, indicating whether to enable the trailing node
|
|
126
|
+
*
|
|
127
|
+
* @default true
|
|
128
|
+
*/
|
|
129
|
+
trailingNode: Partial<TrailingNodeOptions> | false;
|
|
130
|
+
/**
|
|
131
|
+
* textBubble options or false, indicating whether to enable the textBubble
|
|
132
|
+
*
|
|
133
|
+
* @default true
|
|
134
|
+
*/
|
|
135
|
+
textBubble: Partial<TextBubbleOptions> | false;
|
|
136
|
+
/**
|
|
137
|
+
* selection options or false, indicating whether to enable the selection
|
|
138
|
+
*
|
|
139
|
+
* @default true
|
|
140
|
+
*/
|
|
141
|
+
selection: any | false;
|
|
142
|
+
}
|
|
143
|
+
|
|
28
144
|
export { BubbleMenu }
|
|
29
145
|
|
|
30
146
|
declare interface BubbleMenuConfig {
|
|
@@ -145,6 +261,36 @@ declare interface BubbleMenuRenderProps {
|
|
|
145
261
|
editor: Editor;
|
|
146
262
|
disabled: boolean;
|
|
147
263
|
bubbleMenu: BubbleMenuProps;
|
|
264
|
+
extensionsNames: string[];
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Represents the ButtonView function.
|
|
269
|
+
*/
|
|
270
|
+
declare type ButtonView<T = any> = (options: ButtonViewParams<T>) => ButtonViewReturn | ButtonViewReturn[];
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Represents the parameters for the ButtonView function.
|
|
274
|
+
*/
|
|
275
|
+
declare interface ButtonViewParams<T = any> {
|
|
276
|
+
/** Editor object */
|
|
277
|
+
editor: Editor;
|
|
278
|
+
/** Extension object */
|
|
279
|
+
extension: Extension<T>;
|
|
280
|
+
/** Translation function */
|
|
281
|
+
t: (path: string) => string;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Represents the return value for the ButtonView component.
|
|
286
|
+
*/
|
|
287
|
+
declare interface ButtonViewReturn {
|
|
288
|
+
/** Component */
|
|
289
|
+
component: unknown;
|
|
290
|
+
/** Component props */
|
|
291
|
+
componentProps: ButtonViewReturnComponentProps;
|
|
292
|
+
/** Component slots */
|
|
293
|
+
componentSlots?: ButtonViewReturnComponentSlots;
|
|
148
294
|
}
|
|
149
295
|
|
|
150
296
|
/**
|
|
@@ -162,6 +308,15 @@ declare interface ButtonViewReturnComponentProps {
|
|
|
162
308
|
[x: string]: any;
|
|
163
309
|
}
|
|
164
310
|
|
|
311
|
+
/**
|
|
312
|
+
* Represents the slots for the ButtonView component.
|
|
313
|
+
*/
|
|
314
|
+
declare interface ButtonViewReturnComponentSlots {
|
|
315
|
+
/** Dialog slot */
|
|
316
|
+
dialog: () => any;
|
|
317
|
+
[x: string]: () => any;
|
|
318
|
+
}
|
|
319
|
+
|
|
165
320
|
declare const _default: ForwardRefExoticComponent<RichTextEditorProps & RefAttributes< {
|
|
166
321
|
editor: Editor_2 | null;
|
|
167
322
|
}>>;
|
|
@@ -169,6 +324,20 @@ export default _default;
|
|
|
169
324
|
|
|
170
325
|
export { Editor }
|
|
171
326
|
|
|
327
|
+
/**
|
|
328
|
+
* Represents the general options for Tiptap extensions.
|
|
329
|
+
*/
|
|
330
|
+
declare interface GeneralOptions<T> {
|
|
331
|
+
/** Enabled divider */
|
|
332
|
+
divider: boolean;
|
|
333
|
+
/** Enabled spacer */
|
|
334
|
+
spacer: boolean;
|
|
335
|
+
/** Button view function */
|
|
336
|
+
button: ButtonView<T>;
|
|
337
|
+
/** Show on Toolbar */
|
|
338
|
+
toolbar?: boolean;
|
|
339
|
+
}
|
|
340
|
+
|
|
172
341
|
/**
|
|
173
342
|
* Interface for RichTextEditor component props
|
|
174
343
|
*/
|
|
@@ -217,6 +386,9 @@ declare interface RichTextEditorProps {
|
|
|
217
386
|
resetCSS?: boolean;
|
|
218
387
|
}
|
|
219
388
|
|
|
389
|
+
declare interface TextBubbleOptions extends GeneralOptions<TextBubbleOptions> {
|
|
390
|
+
}
|
|
391
|
+
|
|
220
392
|
/**
|
|
221
393
|
* Represents the ToolbarItemProps.
|
|
222
394
|
*/
|
|
@@ -240,6 +412,16 @@ declare interface ToolbarRenderProps {
|
|
|
240
412
|
disabled: boolean;
|
|
241
413
|
}
|
|
242
414
|
|
|
415
|
+
/**
|
|
416
|
+
* Extension based on:
|
|
417
|
+
* - https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/extensions/TrailingNode.js
|
|
418
|
+
* - https://github.com/remirror/remirror/blob/e0f1bec4a1e8073ce8f5500d62193e52321155b9/packages/prosemirror-trailing-node/src/trailing-node-plugin.ts
|
|
419
|
+
*/
|
|
420
|
+
declare interface TrailingNodeOptions {
|
|
421
|
+
node: string;
|
|
422
|
+
notAfter: string[];
|
|
423
|
+
}
|
|
424
|
+
|
|
243
425
|
export { UseEditorOptions }
|
|
244
426
|
|
|
245
427
|
export declare function useEditorState(): UseEditorStateReturn;
|
|
@@ -257,15 +439,8 @@ export { }
|
|
|
257
439
|
|
|
258
440
|
declare module '@tiptap/core' {
|
|
259
441
|
interface Commands<ReturnType> {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
* Add an video
|
|
263
|
-
*/
|
|
264
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
265
|
-
/**
|
|
266
|
-
* Update an video
|
|
267
|
-
*/
|
|
268
|
-
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
442
|
+
attachment: {
|
|
443
|
+
setAttachment: (attrs?: unknown) => ReturnType;
|
|
269
444
|
};
|
|
270
445
|
}
|
|
271
446
|
}
|
|
@@ -282,17 +457,8 @@ declare module '@tiptap/core' {
|
|
|
282
457
|
|
|
283
458
|
declare module '@tiptap/core' {
|
|
284
459
|
interface Commands<ReturnType> {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
* Set the text font size. ex: "12px", "2em", or "small". Must be a valid
|
|
288
|
-
* CSS font-size
|
|
289
|
-
* (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size).
|
|
290
|
-
*/
|
|
291
|
-
setFontSize: (fontSize: string) => ReturnType;
|
|
292
|
-
/**
|
|
293
|
-
* Unset the font size
|
|
294
|
-
*/
|
|
295
|
-
unsetFontSize: () => ReturnType;
|
|
460
|
+
excalidraw: {
|
|
461
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
296
462
|
};
|
|
297
463
|
}
|
|
298
464
|
}
|
|
@@ -300,9 +466,11 @@ declare module '@tiptap/core' {
|
|
|
300
466
|
|
|
301
467
|
declare module '@tiptap/core' {
|
|
302
468
|
interface Commands<ReturnType> {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
469
|
+
emoji: {
|
|
470
|
+
setEmoji: (emoji: {
|
|
471
|
+
name: string;
|
|
472
|
+
emoji: string;
|
|
473
|
+
}) => ReturnType;
|
|
306
474
|
};
|
|
307
475
|
}
|
|
308
476
|
}
|
|
@@ -310,15 +478,9 @@ declare module '@tiptap/core' {
|
|
|
310
478
|
|
|
311
479
|
declare module '@tiptap/core' {
|
|
312
480
|
interface Commands<ReturnType> {
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
*/
|
|
317
|
-
indent: () => ReturnType;
|
|
318
|
-
/**
|
|
319
|
-
* Set the outdent attribute
|
|
320
|
-
*/
|
|
321
|
-
outdent: () => ReturnType;
|
|
481
|
+
drawer: {
|
|
482
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
483
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
322
484
|
};
|
|
323
485
|
}
|
|
324
486
|
}
|
|
@@ -326,19 +488,8 @@ declare module '@tiptap/core' {
|
|
|
326
488
|
|
|
327
489
|
declare module '@tiptap/core' {
|
|
328
490
|
interface Commands<ReturnType> {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
* Add an image
|
|
332
|
-
*/
|
|
333
|
-
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
334
|
-
/**
|
|
335
|
-
* Update an image
|
|
336
|
-
*/
|
|
337
|
-
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
338
|
-
/**
|
|
339
|
-
* Set image alignment
|
|
340
|
-
*/
|
|
341
|
-
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
491
|
+
exportWord: {
|
|
492
|
+
exportToWord: () => ReturnType;
|
|
342
493
|
};
|
|
343
494
|
}
|
|
344
495
|
}
|
|
@@ -346,13 +497,17 @@ declare module '@tiptap/core' {
|
|
|
346
497
|
|
|
347
498
|
declare module '@tiptap/core' {
|
|
348
499
|
interface Commands<ReturnType> {
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
500
|
+
fontSize: {
|
|
501
|
+
/**
|
|
502
|
+
* Set the text font size. ex: "12px", "2em", or "small". Must be a valid
|
|
503
|
+
* CSS font-size
|
|
504
|
+
* (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size).
|
|
505
|
+
*/
|
|
506
|
+
setFontSize: (fontSize: string) => ReturnType;
|
|
507
|
+
/**
|
|
508
|
+
* Unset the font size
|
|
509
|
+
*/
|
|
510
|
+
unsetFontSize: () => ReturnType;
|
|
356
511
|
};
|
|
357
512
|
}
|
|
358
513
|
}
|
|
@@ -360,9 +515,8 @@ declare module '@tiptap/core' {
|
|
|
360
515
|
|
|
361
516
|
declare module '@tiptap/core' {
|
|
362
517
|
interface Commands<ReturnType> {
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
unsetTableCellBackground: () => ReturnType;
|
|
518
|
+
painter: {
|
|
519
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
366
520
|
};
|
|
367
521
|
}
|
|
368
522
|
}
|
|
@@ -385,14 +539,19 @@ declare module '@tiptap/core' {
|
|
|
385
539
|
|
|
386
540
|
declare module '@tiptap/core' {
|
|
387
541
|
interface Commands<ReturnType> {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
542
|
+
imageUpload: {
|
|
543
|
+
/**
|
|
544
|
+
* Add an image
|
|
545
|
+
*/
|
|
546
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
547
|
+
/**
|
|
548
|
+
* Update an image
|
|
549
|
+
*/
|
|
550
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
551
|
+
/**
|
|
552
|
+
* Set image alignment
|
|
553
|
+
*/
|
|
554
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
396
555
|
};
|
|
397
556
|
}
|
|
398
557
|
}
|
|
@@ -400,8 +559,19 @@ declare module '@tiptap/core' {
|
|
|
400
559
|
|
|
401
560
|
declare module '@tiptap/core' {
|
|
402
561
|
interface Commands<ReturnType> {
|
|
403
|
-
|
|
404
|
-
|
|
562
|
+
imageGifUpload: {
|
|
563
|
+
/**
|
|
564
|
+
* Add an image gif
|
|
565
|
+
*/
|
|
566
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
567
|
+
/**
|
|
568
|
+
* Update an image gif
|
|
569
|
+
*/
|
|
570
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
571
|
+
/**
|
|
572
|
+
* Set image alignment
|
|
573
|
+
*/
|
|
574
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
405
575
|
};
|
|
406
576
|
}
|
|
407
577
|
}
|
|
@@ -409,8 +579,15 @@ declare module '@tiptap/core' {
|
|
|
409
579
|
|
|
410
580
|
declare module '@tiptap/core' {
|
|
411
581
|
interface Commands<ReturnType> {
|
|
412
|
-
|
|
413
|
-
|
|
582
|
+
indent: {
|
|
583
|
+
/**
|
|
584
|
+
* Set the indent attribute
|
|
585
|
+
*/
|
|
586
|
+
indent: () => ReturnType;
|
|
587
|
+
/**
|
|
588
|
+
* Set the outdent attribute
|
|
589
|
+
*/
|
|
590
|
+
outdent: () => ReturnType;
|
|
414
591
|
};
|
|
415
592
|
}
|
|
416
593
|
}
|
|
@@ -418,8 +595,8 @@ declare module '@tiptap/core' {
|
|
|
418
595
|
|
|
419
596
|
declare module '@tiptap/core' {
|
|
420
597
|
interface Commands<ReturnType> {
|
|
421
|
-
|
|
422
|
-
|
|
598
|
+
katex: {
|
|
599
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
423
600
|
};
|
|
424
601
|
}
|
|
425
602
|
}
|
|
@@ -427,9 +604,9 @@ declare module '@tiptap/core' {
|
|
|
427
604
|
|
|
428
605
|
declare module '@tiptap/core' {
|
|
429
606
|
interface Commands<ReturnType> {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
607
|
+
lineHeight: {
|
|
608
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
609
|
+
unsetLineHeight: () => ReturnType;
|
|
433
610
|
};
|
|
434
611
|
}
|
|
435
612
|
}
|
|
@@ -437,11 +614,9 @@ declare module '@tiptap/core' {
|
|
|
437
614
|
|
|
438
615
|
declare module '@tiptap/core' {
|
|
439
616
|
interface Commands<ReturnType> {
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
emoji: string;
|
|
444
|
-
}) => ReturnType;
|
|
617
|
+
mermaid: {
|
|
618
|
+
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
619
|
+
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
445
620
|
};
|
|
446
621
|
}
|
|
447
622
|
}
|
|
@@ -449,8 +624,13 @@ declare module '@tiptap/core' {
|
|
|
449
624
|
|
|
450
625
|
declare module '@tiptap/core' {
|
|
451
626
|
interface Commands<ReturnType> {
|
|
452
|
-
|
|
453
|
-
|
|
627
|
+
columns: {
|
|
628
|
+
insertColumns: (attrs?: {
|
|
629
|
+
cols: number;
|
|
630
|
+
}) => ReturnType;
|
|
631
|
+
addColBefore: () => ReturnType;
|
|
632
|
+
addColAfter: () => ReturnType;
|
|
633
|
+
deleteCol: () => ReturnType;
|
|
454
634
|
};
|
|
455
635
|
}
|
|
456
636
|
}
|
|
@@ -458,19 +638,14 @@ declare module '@tiptap/core' {
|
|
|
458
638
|
|
|
459
639
|
declare module '@tiptap/core' {
|
|
460
640
|
interface Commands<ReturnType> {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
470
|
-
/**
|
|
471
|
-
* Set image alignment
|
|
472
|
-
*/
|
|
473
|
-
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
641
|
+
search: {
|
|
642
|
+
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
643
|
+
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
644
|
+
replace: () => ReturnType;
|
|
645
|
+
replaceAll: () => ReturnType;
|
|
646
|
+
goToPrevSearchResult: () => void;
|
|
647
|
+
goToNextSearchResult: () => void;
|
|
648
|
+
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
474
649
|
};
|
|
475
650
|
}
|
|
476
651
|
}
|
|
@@ -478,8 +653,9 @@ declare module '@tiptap/core' {
|
|
|
478
653
|
|
|
479
654
|
declare module '@tiptap/core' {
|
|
480
655
|
interface Commands<ReturnType> {
|
|
481
|
-
|
|
482
|
-
|
|
656
|
+
tableOfContents: {
|
|
657
|
+
setTableOfContents: () => ReturnType;
|
|
658
|
+
removeTableOfContents: () => ReturnType;
|
|
483
659
|
};
|
|
484
660
|
}
|
|
485
661
|
}
|
|
@@ -487,9 +663,14 @@ declare module '@tiptap/core' {
|
|
|
487
663
|
|
|
488
664
|
declare module '@tiptap/core' {
|
|
489
665
|
interface Commands<ReturnType> {
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
666
|
+
twitter: {
|
|
667
|
+
/**
|
|
668
|
+
* Insert a tweet
|
|
669
|
+
* @param options The tweet attributes
|
|
670
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
671
|
+
*/
|
|
672
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
673
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
493
674
|
};
|
|
494
675
|
}
|
|
495
676
|
}
|
|
@@ -497,9 +678,15 @@ declare module '@tiptap/core' {
|
|
|
497
678
|
|
|
498
679
|
declare module '@tiptap/core' {
|
|
499
680
|
interface Commands<ReturnType> {
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
681
|
+
video: {
|
|
682
|
+
/**
|
|
683
|
+
* Add an video
|
|
684
|
+
*/
|
|
685
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
686
|
+
/**
|
|
687
|
+
* Update an video
|
|
688
|
+
*/
|
|
689
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
503
690
|
};
|
|
504
691
|
}
|
|
505
692
|
}
|
|
@@ -507,14 +694,9 @@ declare module '@tiptap/core' {
|
|
|
507
694
|
|
|
508
695
|
declare module '@tiptap/core' {
|
|
509
696
|
interface Commands<ReturnType> {
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
* @param options The tweet attributes
|
|
514
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
515
|
-
*/
|
|
516
|
-
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
517
|
-
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
697
|
+
tableCellBackground: {
|
|
698
|
+
setTableCellBackground: (color: string) => ReturnType;
|
|
699
|
+
unsetTableCellBackground: () => ReturnType;
|
|
518
700
|
};
|
|
519
701
|
}
|
|
520
702
|
}
|