reactjs-tiptap-editor 0.1.13 → 0.1.15

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/index.d.ts CHANGED
@@ -1,177 +1,11 @@
1
1
  import { AnyExtension } from '@tiptap/core';
2
- import { BlockquoteOptions as BlockquoteOptions_2 } from '@tiptap/extension-blockquote';
3
- import { BoldOptions as BoldOptions_2 } from '@tiptap/extension-bold';
4
2
  import { BubbleMenu } from '@tiptap/react';
5
- import { BulletListOptions as BulletListOptions_2 } from '@tiptap/extension-bullet-list';
6
- import { BundledLanguage } from 'shiki';
7
- import { BundledTheme } from 'shiki';
8
- import { CharacterCountOptions } from '@tiptap/extension-character-count';
9
- import { CodeBlockOptions as CodeBlockOptions_2 } from '@tiptap/extension-code-block';
10
- import { CodeOptions as CodeOptions_2 } from '@tiptap/extension-code';
11
- import { ColorOptions as ColorOptions_2 } from '@tiptap/extension-color';
12
- import { DropcursorOptions } from '@tiptap/extension-dropcursor';
13
3
  import { Editor } from '@tiptap/react';
14
4
  import { Editor as Editor_2 } from '@tiptap/core';
15
- import { Extension } from '@tiptap/core';
16
- import { FocusOptions as FocusOptions_2 } from '@tiptap/extension-focus';
17
- import { FontFamilyOptions as FontFamilyOptions_2 } from '@tiptap/extension-font-family';
18
5
  import { ForwardRefExoticComponent } from 'react';
19
- import { HardBreakOptions } from '@tiptap/extension-hard-break';
20
- import { HeadingOptions as HeadingOptions_2 } from '@tiptap/extension-heading';
21
- import { HighlightOptions as HighlightOptions_2 } from '@tiptap/extension-highlight';
22
- import { HistoryOptions as HistoryOptions_2 } from '@tiptap/extension-history';
23
- import { HorizontalRuleOptions as HorizontalRuleOptions_2 } from '@tiptap/extension-horizontal-rule';
24
- import { ImageOptions } from '@tiptap/extension-image';
25
- import { ItalicOptions as ItalicOptions_2 } from '@tiptap/extension-italic';
26
- import { LinkOptions as LinkOptions_2 } from '@tiptap/extension-link';
27
- import { ListItemOptions } from '@tiptap/extension-list-item';
28
- import { Mark } from '@tiptap/core';
29
- import { MentionNodeAttrs } from '@tiptap/extension-mention';
30
- import { MentionOptions } from '@tiptap/extension-mention';
31
- import { Node as Node_2 } from '@tiptap/core';
32
- import { OrderedListOptions as OrderedListOptions_2 } from '@tiptap/extension-ordered-list';
33
- import { ParagraphOptions } from '@tiptap/extension-paragraph';
34
- import { PlaceholderOptions } from '@tiptap/extension-placeholder';
35
6
  import { RefAttributes } from 'react';
36
- import { StrikeOptions as StrikeOptions_2 } from '@tiptap/extension-strike';
37
- import { SubscriptExtensionOptions } from '@tiptap/extension-subscript';
38
- import { SuperscriptExtensionOptions } from '@tiptap/extension-superscript';
39
- import { TableCellOptions } from '@tiptap/extension-table-cell';
40
- import { TableHeaderOptions } from '@tiptap/extension-table-header';
41
- import { TableRowOptions } from '@tiptap/extension-table-row';
42
- import { TaskItemOptions } from '@tiptap/extension-task-item';
43
- import { TaskListOptions as TaskListOptions_2 } from '@tiptap/extension-task-list';
44
- import { TextAlignOptions as TextAlignOptions_2 } from '@tiptap/extension-text-align';
45
- import { TextStyleOptions } from '@tiptap/extension-text-style';
46
- import { UnderlineOptions as UnderlineOptions_2 } from '@tiptap/extension-underline';
47
7
  import { UseEditorOptions } from '@tiptap/react';
48
8
 
49
- declare type Alignments = 'left' | 'center' | 'right' | 'justify';
50
-
51
- export declare const Attachment: Node_2<AttachmentOptions, any>;
52
-
53
- declare interface AttachmentOptions extends GeneralOptions<AttachmentOptions> {
54
- /** Function for uploading files */
55
- upload?: (file: File) => Promise<string>;
56
- }
57
-
58
- export declare const BaseKit: Extension<BaseKitOptions, any>;
59
-
60
- /**
61
- * Represents the interface for options in the base toolkit.
62
- */
63
- export declare interface BaseKitOptions {
64
- /**
65
- * Whether to enable the document option
66
- *
67
- * @default true
68
- */
69
- document: false;
70
- /**
71
- * Whether to enable the document option
72
- *
73
- * @default false
74
- */
75
- multiColumn?: boolean;
76
- /**
77
- * Whether to enable the text option
78
- *
79
- * @default true
80
- */
81
- text: false;
82
- /**
83
- * Whether to enable the Gapcursor
84
- *
85
- * @default true
86
- */
87
- gapcursor: false;
88
- /**
89
- * Dropcursor options or false, indicating whether to enable the drop cursor
90
- *
91
- * @default true
92
- */
93
- dropcursor: Partial<DropcursorOptions> | false;
94
- /**
95
- * character count options or false, indicating whether to enable character count
96
- *
97
- * @default true
98
- */
99
- characterCount: Partial<CharacterCountOptions> | false;
100
- /**
101
- * HardBreak options or false, indicating whether to enable hard breaks
102
- *
103
- * @default true
104
- */
105
- hardBreak: Partial<HardBreakOptions> | false;
106
- /**
107
- * Placeholder options or false, indicating whether to enable placeholders
108
- *
109
- * @default true
110
- */
111
- placeholder: Partial<PlaceholderOptions> | false;
112
- /**
113
- * Paragraph options or false, indicating whether to enable paragraph functionality
114
- *
115
- * @default true
116
- */
117
- paragraph: Partial<ParagraphOptions> | false;
118
- /**
119
- * Focus options or false, indicating whether to enable focus functionality
120
- *
121
- * @default true
122
- */
123
- focus: Partial<FocusOptions_2> | false;
124
- /**
125
- * ListItem options or false, indicating whether to enable list item functionality
126
- *
127
- * @default true
128
- */
129
- listItem: Partial<ListItemOptions> | false;
130
- /**
131
- * Text Style options or false, indicating whether to enable text style functionality
132
- *
133
- * @default true
134
- */
135
- textStyle: Partial<TextStyleOptions> | false;
136
- /**
137
- * Bubble options, taking `BubbleOptions<BaseKitOptions>` as parameters, indicating whether to enable the bubble functionality
138
- */
139
- bubble: any;
140
- /**
141
- * Iframe options or false, indicating whether to enable the iframe
142
- *
143
- * @default true
144
- */
145
- /**
146
- * Trailing node options or false, indicating whether to enable the trailing node
147
- *
148
- * @default true
149
- */
150
- trailingNode: Partial<TrailingNodeOptions> | false;
151
- /**
152
- * textBubble options or false, indicating whether to enable the textBubble
153
- *
154
- * @default true
155
- */
156
- textBubble: Partial<TextBubbleOptions> | false;
157
- /**
158
- * selection options or false, indicating whether to enable the selection
159
- *
160
- * @default true
161
- */
162
- selection: any | false;
163
- }
164
-
165
- export declare const Blockquote: Node_2<BlockquoteOptions, any>;
166
-
167
- export declare interface BlockquoteOptions extends BlockquoteOptions_2, GeneralOptions<BlockquoteOptions> {
168
- }
169
-
170
- export declare const Bold: Mark<BoldOptions, any>;
171
-
172
- export declare interface BoldOptions extends BoldOptions_2, GeneralOptions<BoldOptions> {
173
- }
174
-
175
9
  export { BubbleMenu }
176
10
 
177
11
  /**
@@ -281,100 +115,6 @@ declare interface BubbleMenuRenderProps {
281
115
  bubbleMenu: BubbleMenuProps;
282
116
  }
283
117
 
284
- export declare const BulletList: Node_2<BulletListOptions, any>;
285
-
286
- export declare interface BulletListOptions extends BulletListOptions_2, GeneralOptions<BulletListOptions> {
287
- }
288
-
289
- /**
290
- * Represents the ButtonView function.
291
- */
292
- declare interface ButtonView<T = any> {
293
- (options: ButtonViewParams<T>): ButtonViewReturn | ButtonViewReturn[];
294
- }
295
-
296
- /**
297
- * Represents the parameters for the ButtonView function.
298
- */
299
- declare interface ButtonViewParams<T = any> {
300
- /** Editor object */
301
- editor: Editor;
302
- /** Extension object */
303
- extension: Extension<T>;
304
- /** Translation function */
305
- t: (path: string) => string;
306
- }
307
-
308
- /**
309
- * Represents the return value for the ButtonView component.
310
- */
311
- declare interface ButtonViewReturn {
312
- /** Component */
313
- component: unknown;
314
- /** Component props */
315
- componentProps: ButtonViewReturnComponentProps;
316
- /** Component slots */
317
- componentSlots?: ButtonViewReturnComponentSlots;
318
- }
319
-
320
- /**
321
- * Represents the props for the ButtonView component.
322
- */
323
- declare interface ButtonViewReturnComponentProps {
324
- /** Method triggered when action is performed */
325
- action?: (value?: any) => void;
326
- /** Whether it is in the active state */
327
- isActive?: () => boolean;
328
- /** Button icon */
329
- icon?: any;
330
- /** Text displayed on hover */
331
- tooltip?: string;
332
- [x: string]: any;
333
- }
334
-
335
- /**
336
- * Represents the slots for the ButtonView component.
337
- */
338
- declare interface ButtonViewReturnComponentSlots {
339
- /** Dialog slot */
340
- dialog: () => any;
341
- [x: string]: () => any;
342
- }
343
-
344
- export declare const Clear: Node_2<ClearOptions, any>;
345
-
346
- export declare interface ClearOptions extends GeneralOptions<ClearOptions> {
347
- }
348
-
349
- export declare const Code: Mark<CodeOptions, any>;
350
-
351
- export declare const CodeBlock: Node_2<CodeBlockOptions, any>;
352
-
353
- export declare interface CodeBlockOptions extends GeneralOptions<CodeBlockOptions_2> {
354
- languages?: BundledLanguage[];
355
- defaultTheme: BundledTheme;
356
- }
357
-
358
- export declare interface CodeOptions extends CodeOptions_2, GeneralOptions<CodeOptions> {
359
- }
360
-
361
- export declare const Color: Extension<ColorOptions, any>;
362
-
363
- export declare interface ColorOptions extends ColorOptions_2, GeneralOptions<ColorOptions> {
364
- /**
365
- * An array of color options to display in the color picker
366
- */
367
- colors?: string[];
368
- /**
369
- * The default color to use when no color is selected
370
- */
371
- defaultColor?: string;
372
- }
373
-
374
- export declare const Column: Node_2<any, any>;
375
-
376
- export declare const ColumnActionButton: Extension<any, any>;
377
-
378
118
  declare const _default: ForwardRefExoticComponent<RichTextEditorProps & RefAttributes< {
379
119
  editor: Editor_2 | null;
380
120
  }>>;
@@ -382,732 +122,6 @@ export default _default;
382
122
 
383
123
  export { Editor }
384
124
 
385
- export declare const Emoji: Node_2<any, any>;
386
-
387
- export declare const en: {
388
- 'editor.remove': string;
389
- 'editor.copy': string;
390
- 'editor.words': string;
391
- 'editor.characters': string;
392
- 'editor.default': string;
393
- 'editor.recent': string;
394
- 'editor.nofill': string;
395
- 'editor.format': string;
396
- 'editor.delete': string;
397
- 'editor.edit': string;
398
- 'editor.settings': string;
399
- 'editor.table_of_content': string;
400
- 'editor.draghandle.tooltip': string;
401
- 'editor.copyToClipboard': string;
402
- 'editor.importWord.tooltip': string;
403
- 'editor.slash': string;
404
- 'editor.slash.empty': string;
405
- 'editor.slash.format': string;
406
- 'editor.slash.insert': string;
407
- 'editor.slash.embed': string;
408
- 'editor.content': string;
409
- 'editor.fontFamily.tooltip': string;
410
- 'editor.fontFamily.default.tooltip': string;
411
- 'editor.moremark': string;
412
- 'editor.size.small.tooltip': string;
413
- 'editor.size.medium.tooltip': string;
414
- 'editor.size.large.tooltip': string;
415
- 'editor.bold.tooltip': string;
416
- 'editor.italic.tooltip': string;
417
- 'editor.underline.tooltip': string;
418
- 'editor.strike.tooltip': string;
419
- 'editor.color.tooltip': string;
420
- 'editor.color.more': string;
421
- 'editor.highlight.tooltip': string;
422
- 'editor.lineheight.tooltip': string;
423
- 'editor.heading.tooltip': string;
424
- 'editor.heading.h1.tooltip': string;
425
- 'editor.heading.h2.tooltip': string;
426
- 'editor.heading.h3.tooltip': string;
427
- 'editor.heading.h4.tooltip': string;
428
- 'editor.heading.h5.tooltip': string;
429
- 'editor.heading.h6.tooltip': string;
430
- 'editor.paragraph.tooltip': string;
431
- 'editor.textalign.tooltip': string;
432
- 'editor.textalign.left.tooltip': string;
433
- 'editor.textalign.center.tooltip': string;
434
- 'editor.textalign.right.tooltip': string;
435
- 'editor.textalign.justify.tooltip': string;
436
- 'editor.indent': string;
437
- 'editor.indent.indent': string;
438
- 'editor.indent.outdent': string;
439
- 'editor.fontSize.tooltip': string;
440
- 'editor.fontSize.default.tooltip': string;
441
- 'editor.superscript.tooltip': string;
442
- 'editor.subscript.tooltip': string;
443
- 'editor.bulletlist.tooltip': string;
444
- 'editor.orderedlist.tooltip': string;
445
- 'editor.tasklist.tooltip': string;
446
- 'editor.indent.tooltip': string;
447
- 'editor.outdent.tooltip': string;
448
- 'editor.columns.tooltip': string;
449
- 'editor.link.tooltip': string;
450
- 'editor.link.unlink.tooltip': string;
451
- 'editor.link.open.tooltip': string;
452
- 'editor.link.edit.tooltip': string;
453
- 'editor.link.dialog.title': string;
454
- 'editor.link.dialog.link': string;
455
- 'editor.link.dialog.text': string;
456
- 'editor.link.dialog.openInNewTab': string;
457
- 'editor.link.dialog.link.placeholder': string;
458
- 'editor.link.dialog.text.placeholder': string;
459
- 'editor.link.dialog.button.apply': string;
460
- 'editor.image.tooltip': string;
461
- 'editor.image.dragger.tooltip': string;
462
- 'editor.image.float.left.tooltip': string;
463
- 'editor.image.float.none.tooltip': string;
464
- 'editor.image.float.right.tooltip': string;
465
- 'editor.image.dialog.title': string;
466
- 'editor.image.dialog.tab.url': string;
467
- 'editor.image.dialog.tab.upload': string;
468
- 'editor.image.dialog.tab.uploadCrop': string;
469
- 'editor.image.dialog.uploading': string;
470
- 'editor.link.dialog.inline': string;
471
- 'editor.image.dialog.form.link': string;
472
- 'editor.image.dialog.placeholder': string;
473
- 'editor.image.dialog.form.alt': string;
474
- 'editor.image.dialog.form.aspectRatio': string;
475
- 'editor.image.dialog.form.file': string;
476
- 'editor.image.dialog.button.apply': string;
477
- 'editor.video.tooltip': string;
478
- 'editor.video.dialog.tab.upload': string;
479
- 'editor.video.dialog.uploading': string;
480
- 'editor.video.dialog.title': string;
481
- 'editor.video.dialog.link': string;
482
- 'editor.video.dialog.placeholder': string;
483
- 'editor.video.dialog.button.apply': string;
484
- 'editor.table.tooltip': string;
485
- 'editor.table.menu.insert_table': string;
486
- 'editor.table.menu.insert_table.with_header_row': string;
487
- 'editor.table.menu.add_column_before': string;
488
- 'editor.table.menu.add_column_after': string;
489
- 'editor.table.menu.delete_column': string;
490
- 'editor.table.menu.add_row_before': string;
491
- 'editor.table.menu.add_row_after': string;
492
- 'editor.table.menu.delete_row': string;
493
- 'editor.table.menu.merge_or_split_cells': string;
494
- 'editor.table.menu.delete_table': string;
495
- 'editor.blockquote.tooltip': string;
496
- 'editor.horizontalrule.tooltip': string;
497
- 'editor.code.tooltip': string;
498
- 'editor.codeblock.tooltip': string;
499
- 'editor.clear.tooltip': string;
500
- 'editor.undo.tooltip': string;
501
- 'editor.redo.tooltip': string;
502
- 'editor.fullscreen.tooltip.fullscreen': string;
503
- 'editor.fullscreen.tooltip.exit': string;
504
- 'editor.imageUpload.cancel': string;
505
- 'editor.imageUpload.crop': string;
506
- 'editor.imageUpload.fileTypeNotSupported': string;
507
- 'editor.imageUpload.fileSizeTooBig': string;
508
- 'editor.table.menu.insertColumnBefore': string;
509
- 'editor.table.menu.insertColumnAfter': string;
510
- 'editor.table.menu.deleteColumn': string;
511
- 'editor.table.menu.insertRowAbove': string;
512
- 'editor.table.menu.insertRowBelow': string;
513
- 'editor.table.menu.deleteRow': string;
514
- 'editor.table.menu.mergeCells': string;
515
- 'editor.table.menu.splitCells': string;
516
- 'editor.table.menu.deleteTable': string;
517
- 'editor.table.menu.setCellsBgColor': string;
518
- 'editor.emoji.tooltip': string;
519
- 'editor.iframe.tooltip': string;
520
- 'editor.searchAndReplace.tooltip': string;
521
- 'editor.search.dialog.text': string;
522
- 'editor.replace.dialog.text': string;
523
- 'editor.replaceAll.dialog.text': string;
524
- 'editor.previous.dialog.text': string;
525
- 'editor.next.dialog.text': string;
526
- no_result_found: string;
527
- 'Smileys & People': string;
528
- 'Animals & Nature': string;
529
- 'Food & Drink': string;
530
- Activity: string;
531
- 'Travel & Places': string;
532
- Object: string;
533
- Symbol: string;
534
- Flags: string;
535
- 'Frequently used': string;
536
- 'editor.formula.dialog.text': string;
537
- 'editor.katex.tooltip': string;
538
- 'editor.exportPdf.tooltip': string;
539
- 'editor.exportWord.tooltip': string;
540
- 'editor.importWrod.tooltip': string;
541
- 'editor.textDirection.tooltip': string;
542
- 'editor.textDirection.auto.tooltip': string;
543
- 'editor.textDirection.ltr.tooltip': string;
544
- 'editor.textDirection.rtl.tooltip': string;
545
- 'editor.attachment.tooltip': string;
546
- 'editor.attachment.uploading': string;
547
- 'editor.attachment.please_upload': string;
548
- 'editor.imageGif.tooltip': string;
549
- 'editor.replace.caseSensitive': string;
550
- 'editor.mermaid.tooltip': string;
551
- 'editor.twitter.tooltip': string;
552
- 'editor.tooltip.flipX': string;
553
- 'editor.tooltip.flipY': string;
554
- };
555
-
556
- export declare const Excalidraw: Node_2<any, any>;
557
-
558
- export declare const ExportPdf: Extension<any, any>;
559
-
560
- export declare const ExportWord: Extension<ExportWordOptions, any>;
561
-
562
- declare interface ExportWordOptions extends GeneralOptions<ExportWordOptions> {
563
- }
564
-
565
- export declare const FontFamily: Extension<FontFamilyOptions, any>;
566
-
567
- declare interface FontFamilyOptions extends FontFamilyOptions_2, GeneralOptions<FontFamilyOptions> {
568
- /**
569
- * Font family list.
570
- */
571
- fontFamilyList: (string | NameValueOption)[];
572
- }
573
-
574
- export declare const FontSize: Extension<FontSizeOptions, any>;
575
-
576
- /**
577
- * Represents the interface for font size options, extending GeneralOptions.
578
- */
579
- export declare interface FontSizeOptions extends GeneralOptions<FontSizeOptions> {
580
- types: string[];
581
- /**
582
- * List of available font size values
583
- *
584
- * @default DEFAULT_FONT_SIZE_LIST
585
- */
586
- fontSizes: (string | NameValueOption)[];
587
- }
588
-
589
- /**
590
- * 格式刷
591
- */
592
- export declare const FormatPainter: Extension<FormatPainterOptions, any>;
593
-
594
- /**
595
- * Represents the interface for font size options, extending GeneralOptions.
596
- */
597
- export declare interface FormatPainterOptions extends GeneralOptions<FormatPainterOptions> {
598
- }
599
-
600
- /**
601
- * Represents the general options for Tiptap extensions.
602
- */
603
- declare interface GeneralOptions<T> {
604
- /** Enabled divider */
605
- divider: boolean;
606
- /** Enabled spacer */
607
- spacer: boolean;
608
- /** Button view function */
609
- button: ButtonView<T>;
610
- /** Show on Toolbar */
611
- toolbar?: boolean;
612
- }
613
-
614
- export declare const Heading: Node_2<HeadingOptions, any>;
615
-
616
- export declare interface HeadingOptions extends HeadingOptions_2, GeneralOptions<HeadingOptions> {
617
- }
618
-
619
- declare const Highlight_2: Mark<HighlightOptions, any>;
620
- export { Highlight_2 as Highlight }
621
-
622
- export declare interface HighlightOptions extends HighlightOptions_2, GeneralOptions<HighlightOptions> {
623
- }
624
-
625
- declare const History_2: Extension<HistoryOptions, any>;
626
- export { History_2 as History }
627
-
628
- export declare interface HistoryOptions extends HistoryOptions_2, GeneralOptions<HistoryOptions> {
629
- }
630
-
631
- export declare const HorizontalRule: Node_2<HorizontalRuleOptions, any>;
632
-
633
- export declare interface HorizontalRuleOptions extends HorizontalRuleOptions_2, GeneralOptions<HorizontalRuleOptions> {
634
- }
635
-
636
- export declare const hu_HU: {
637
- 'editor.remove': string;
638
- 'editor.copy': string;
639
- 'editor.words': string;
640
- 'editor.characters': string;
641
- 'editor.default': string;
642
- 'editor.recent': string;
643
- 'editor.nofill': string;
644
- 'editor.format': string;
645
- 'editor.delete': string;
646
- 'editor.edit': string;
647
- 'editor.settings': string;
648
- 'editor.table_of_content': string;
649
- 'editor.draghandle.tooltip': string;
650
- 'editor.copyToClipboard': string;
651
- 'editor.importWord.tooltip': string;
652
- 'editor.slash': string;
653
- 'editor.slash.empty': string;
654
- 'editor.slash.format': string;
655
- 'editor.slash.insert': string;
656
- 'editor.slash.embed': string;
657
- 'editor.content': string;
658
- 'editor.fontFamily.tooltip': string;
659
- 'editor.fontFamily.default.tooltip': string;
660
- 'editor.moremark': string;
661
- 'editor.size.small.tooltip': string;
662
- 'editor.size.medium.tooltip': string;
663
- 'editor.size.large.tooltip': string;
664
- 'editor.bold.tooltip': string;
665
- 'editor.italic.tooltip': string;
666
- 'editor.underline.tooltip': string;
667
- 'editor.strike.tooltip': string;
668
- 'editor.color.tooltip': string;
669
- 'editor.color.more': string;
670
- 'editor.highlight.tooltip': string;
671
- 'editor.lineheight.tooltip': string;
672
- 'editor.heading.tooltip': string;
673
- 'editor.heading.h1.tooltip': string;
674
- 'editor.heading.h2.tooltip': string;
675
- 'editor.heading.h3.tooltip': string;
676
- 'editor.heading.h4.tooltip': string;
677
- 'editor.heading.h5.tooltip': string;
678
- 'editor.heading.h6.tooltip': string;
679
- 'editor.paragraph.tooltip': string;
680
- 'editor.textalign.tooltip': string;
681
- 'editor.textalign.left.tooltip': string;
682
- 'editor.textalign.center.tooltip': string;
683
- 'editor.textalign.right.tooltip': string;
684
- 'editor.textalign.justify.tooltip': string;
685
- 'editor.indent': string;
686
- 'editor.indent.indent': string;
687
- 'editor.indent.outdent': string;
688
- 'editor.fontSize.tooltip': string;
689
- 'editor.fontSize.default.tooltip': string;
690
- 'editor.superscript.tooltip': string;
691
- 'editor.subscript.tooltip': string;
692
- 'editor.bulletlist.tooltip': string;
693
- 'editor.orderedlist.tooltip': string;
694
- 'editor.tasklist.tooltip': string;
695
- 'editor.indent.tooltip': string;
696
- 'editor.outdent.tooltip': string;
697
- 'editor.columns.tooltip': string;
698
- 'editor.link.tooltip': string;
699
- 'editor.link.unlink.tooltip': string;
700
- 'editor.link.open.tooltip': string;
701
- 'editor.link.edit.tooltip': string;
702
- 'editor.link.dialog.title': string;
703
- 'editor.link.dialog.link': string;
704
- 'editor.link.dialog.text': string;
705
- 'editor.link.dialog.openInNewTab': string;
706
- 'editor.link.dialog.link.placeholder': string;
707
- 'editor.link.dialog.text.placeholder': string;
708
- 'editor.link.dialog.button.apply': string;
709
- 'editor.image.tooltip': string;
710
- 'editor.image.dragger.tooltip': string;
711
- 'editor.image.float.left.tooltip': string;
712
- 'editor.image.float.none.tooltip': string;
713
- 'editor.image.float.right.tooltip': string;
714
- 'editor.image.dialog.title': string;
715
- 'editor.image.dialog.tab.url': string;
716
- 'editor.image.dialog.tab.upload': string;
717
- 'editor.image.dialog.tab.uploadCrop': string;
718
- 'editor.image.dialog.uploading': string;
719
- 'editor.link.dialog.inline': string;
720
- 'editor.image.dialog.form.link': string;
721
- 'editor.image.dialog.placeholder': string;
722
- 'editor.image.dialog.form.alt': string;
723
- 'editor.image.dialog.form.aspectRatio': string;
724
- 'editor.image.dialog.form.file': string;
725
- 'editor.image.dialog.button.apply': string;
726
- 'editor.video.tooltip': string;
727
- 'editor.video.dialog.tab.upload': string;
728
- 'editor.video.dialog.uploading': string;
729
- 'editor.video.dialog.title': string;
730
- 'editor.video.dialog.link': string;
731
- 'editor.video.dialog.placeholder': string;
732
- 'editor.video.dialog.button.apply': string;
733
- 'editor.table.tooltip': string;
734
- 'editor.table.menu.insert_table': string;
735
- 'editor.table.menu.insert_table.with_header_row': string;
736
- 'editor.table.menu.add_column_before': string;
737
- 'editor.table.menu.add_column_after': string;
738
- 'editor.table.menu.delete_column': string;
739
- 'editor.table.menu.add_row_before': string;
740
- 'editor.table.menu.add_row_after': string;
741
- 'editor.table.menu.delete_row': string;
742
- 'editor.table.menu.merge_or_split_cells': string;
743
- 'editor.table.menu.delete_table': string;
744
- 'editor.blockquote.tooltip': string;
745
- 'editor.horizontalrule.tooltip': string;
746
- 'editor.code.tooltip': string;
747
- 'editor.codeblock.tooltip': string;
748
- 'editor.clear.tooltip': string;
749
- 'editor.undo.tooltip': string;
750
- 'editor.redo.tooltip': string;
751
- 'editor.fullscreen.tooltip.fullscreen': string;
752
- 'editor.fullscreen.tooltip.exit': string;
753
- 'editor.imageUpload.cancel': string;
754
- 'editor.imageUpload.crop': string;
755
- 'editor.imageUpload.fileTypeNotSupported': string;
756
- 'editor.imageUpload.fileSizeTooBig': string;
757
- 'editor.table.menu.insertColumnBefore': string;
758
- 'editor.table.menu.insertColumnAfter': string;
759
- 'editor.table.menu.deleteColumn': string;
760
- 'editor.table.menu.insertRowAbove': string;
761
- 'editor.table.menu.insertRowBelow': string;
762
- 'editor.table.menu.deleteRow': string;
763
- 'editor.table.menu.mergeCells': string;
764
- 'editor.table.menu.splitCells': string;
765
- 'editor.table.menu.deleteTable': string;
766
- 'editor.table.menu.setCellsBgColor': string;
767
- 'editor.emoji.tooltip': string;
768
- 'editor.iframe.tooltip': string;
769
- 'editor.searchAndReplace.tooltip': string;
770
- 'editor.search.dialog.text': string;
771
- 'editor.replace.dialog.text': string;
772
- 'editor.replaceAll.dialog.text': string;
773
- 'editor.previous.dialog.text': string;
774
- 'editor.next.dialog.text': string;
775
- no_result_found: string;
776
- 'Smileys & People': string;
777
- 'Animals & Nature': string;
778
- 'Food & Drink': string;
779
- Activity: string;
780
- 'Travel & Places': string;
781
- Object: string;
782
- Symbol: string;
783
- Flags: string;
784
- 'Frequently used': string;
785
- 'editor.formula.dialog.text': string;
786
- 'editor.katex.tooltip': string;
787
- 'editor.exportPdf.tooltip': string;
788
- 'editor.exportWord.tooltip': string;
789
- 'editor.importWrod.tooltip': string;
790
- 'editor.textDirection.tooltip': string;
791
- 'editor.textDirection.auto.tooltip': string;
792
- 'editor.textDirection.ltr.tooltip': string;
793
- 'editor.textDirection.rtl.tooltip': string;
794
- 'editor.attachment.tooltip': string;
795
- 'editor.attachment.uploading': string;
796
- 'editor.attachment.please_upload': string;
797
- 'editor.imageGif.tooltip': string;
798
- 'editor.replace.caseSensitive': string;
799
- 'editor.mermaid.tooltip': string;
800
- 'editor.twitter.tooltip': string;
801
- 'editor.tooltip.flipX': string;
802
- 'editor.tooltip.flipY': string;
803
- };
804
-
805
- export declare const Iframe: Node_2<any, any>;
806
-
807
- declare interface IImageOptions extends GeneralOptions<IImageOptions> {
808
- /** Function for uploading files */
809
- upload?: (file: File) => Promise<string>;
810
- HTMLAttributes?: any;
811
- acceptMimes?: string[];
812
- maxSize?: number;
813
- /** The source URL of the image */
814
- resourceImage: 'upload' | 'link' | 'both';
815
- }
816
-
817
- declare interface IKatexOptions {
818
- HTMLAttributes: Record<string, any>;
819
- }
820
-
821
- declare const Image_2: Node_2<IImageOptions, any>;
822
- export { Image_2 as Image }
823
-
824
- export declare const ImageGif: Node_2<ImageGifOptions, any>;
825
-
826
- declare interface ImageGifOptions extends ImageOptions {
827
- /**
828
- * The key for the gif https://giphy.com/
829
- */
830
- GIPHY_API_KEY: string;
831
- }
832
-
833
- export declare const ImportWord: Extension<ImportWordOptions, any>;
834
-
835
- declare interface ImportWordOptions extends GeneralOptions<ImportWordOptions> {
836
- /**
837
- * 将word 转换成html的接口
838
- */
839
- convert?: (file: File) => Promise<string>;
840
- /** Function for uploading images */
841
- upload?: (files: File[]) => Promise<unknown>;
842
- }
843
-
844
- export declare const Indent: Extension<IndentOptions, any>;
845
-
846
- export declare interface IndentOptions extends GeneralOptions<IndentOptions> {
847
- types: string[];
848
- minIndent: number;
849
- maxIndent: number;
850
- }
851
-
852
- export declare const Italic: Mark<ItalicOptions, any>;
853
-
854
- export declare interface ItalicOptions extends ItalicOptions_2, GeneralOptions<ItalicOptions> {
855
- }
856
-
857
- export declare const Katex: Node_2<IKatexOptions, any>;
858
-
859
- declare type LanguageType = 'en' | 'hu_HU' | 'vi' | 'zh_CN' | 'pt_BR' | (string & {});
860
-
861
- export declare const LineHeight: Extension<LineHeightOptions, any>;
862
-
863
- export declare interface LineHeightOptions extends GeneralOptions<LineHeightOptions> {
864
- types: string[];
865
- lineHeights: string[];
866
- defaultHeight: string;
867
- }
868
-
869
- export declare const Link: Mark<LinkOptions, any>;
870
-
871
- export declare interface LinkOptions extends LinkOptions_2, GeneralOptions<LinkOptions> {
872
- }
873
-
874
- declare class Locale {
875
- private emitter;
876
- constructor();
877
- get lang(): LanguageType;
878
- set lang(lang: LanguageType);
879
- get message(): Record<LanguageType, Record<MessageKeysType, string>>;
880
- set message(message: Record<LanguageType, Record<MessageKeysType, string>>);
881
- loadLangMessage(lang: LanguageType): Record<MessageKeysType, string>;
882
- private isLangSupported;
883
- setLang(lang: LanguageType): void;
884
- registerWatchLang(hook: (lang: LanguageType) => void): {
885
- unsubscribe: () => void;
886
- };
887
- setMessage(lang: string, message: Record<MessageKeysType, string>): void;
888
- buildLocalesHandler(lang?: LanguageType): (path: MessageKeysType) => string;
889
- }
890
-
891
- export declare const locale: Locale;
892
-
893
- export declare const Mention: Node_2<MentionOptions<any, MentionNodeAttrs>, any>;
894
-
895
- export declare const Mermaid: Node_2<MermaidOptions, any>;
896
-
897
- declare interface MermaidOptions extends GeneralOptions<MermaidOptions> {
898
- /** Function for uploading files */
899
- upload?: (file: File) => Promise<string>;
900
- }
901
-
902
- declare type MessageKeysType = keyof typeof en;
903
-
904
- export declare const MoreMark: Extension<MoreMarkOptions, any>;
905
-
906
- export declare interface MoreMarkOptions extends GeneralOptions<MoreMarkOptions> {
907
- /**
908
- * // 下标
909
- *
910
- * @default true
911
- */
912
- subscript: Partial<SubscriptExtensionOptions> | false;
913
- /**
914
- * // 上标
915
- *
916
- * @default true
917
- */
918
- superscript: Partial<SuperscriptExtensionOptions> | false;
919
- }
920
-
921
- export declare const MultiColumn: Node_2<any, any>;
922
-
923
- declare interface NameValueOption<T = string> {
924
- name: string;
925
- value: T;
926
- }
927
-
928
- declare interface Options {
929
- onHasOneBeforeInsert?: () => void;
930
- }
931
-
932
- export declare const OrderedList: Node_2<OrderedListOptions, any>;
933
-
934
- export declare interface OrderedListOptions extends OrderedListOptions_2, GeneralOptions<OrderedListOptions> {
935
- }
936
-
937
- export declare const pt_BR: {
938
- 'editor.remove': string;
939
- 'editor.copy': string;
940
- 'editor.words': string;
941
- 'editor.characters': string;
942
- 'editor.default': string;
943
- 'editor.recent': string;
944
- 'editor.nofill': string;
945
- 'editor.format': string;
946
- 'editor.delete': string;
947
- 'editor.edit': string;
948
- 'editor.settings': string;
949
- 'editor.table_of_content': string;
950
- 'editor.draghandle.tooltip': string;
951
- 'editor.copyToClipboard': string;
952
- 'editor.importWord.tooltip': string;
953
- 'editor.slash': string;
954
- 'editor.slash.empty': string;
955
- 'editor.slash.format': string;
956
- 'editor.slash.insert': string;
957
- 'editor.slash.embed': string;
958
- 'editor.content': string;
959
- 'editor.fontFamily.tooltip': string;
960
- 'editor.fontFamily.default.tooltip': string;
961
- 'editor.moremark': string;
962
- 'editor.size.small.tooltip': string;
963
- 'editor.size.medium.tooltip': string;
964
- 'editor.size.large.tooltip': string;
965
- 'editor.bold.tooltip': string;
966
- 'editor.italic.tooltip': string;
967
- 'editor.underline.tooltip': string;
968
- 'editor.strike.tooltip': string;
969
- 'editor.color.tooltip': string;
970
- 'editor.color.more': string;
971
- 'editor.highlight.tooltip': string;
972
- 'editor.lineheight.tooltip': string;
973
- 'editor.heading.tooltip': string;
974
- 'editor.heading.h1.tooltip': string;
975
- 'editor.heading.h2.tooltip': string;
976
- 'editor.heading.h3.tooltip': string;
977
- 'editor.heading.h4.tooltip': string;
978
- 'editor.heading.h5.tooltip': string;
979
- 'editor.heading.h6.tooltip': string;
980
- 'editor.paragraph.tooltip': string;
981
- 'editor.textalign.tooltip': string;
982
- 'editor.textalign.left.tooltip': string;
983
- 'editor.textalign.center.tooltip': string;
984
- 'editor.textalign.right.tooltip': string;
985
- 'editor.textalign.justify.tooltip': string;
986
- 'editor.indent': string;
987
- 'editor.indent.indent': string;
988
- 'editor.indent.outdent': string;
989
- 'editor.fontSize.tooltip': string;
990
- 'editor.fontSize.default.tooltip': string;
991
- 'editor.superscript.tooltip': string;
992
- 'editor.subscript.tooltip': string;
993
- 'editor.bulletlist.tooltip': string;
994
- 'editor.orderedlist.tooltip': string;
995
- 'editor.tasklist.tooltip': string;
996
- 'editor.indent.tooltip': string;
997
- 'editor.outdent.tooltip': string;
998
- 'editor.columns.tooltip': string;
999
- 'editor.link.tooltip': string;
1000
- 'editor.link.unlink.tooltip': string;
1001
- 'editor.link.open.tooltip': string;
1002
- 'editor.link.edit.tooltip': string;
1003
- 'editor.link.dialog.title': string;
1004
- 'editor.link.dialog.link': string;
1005
- 'editor.link.dialog.text': string;
1006
- 'editor.link.dialog.openInNewTab': string;
1007
- 'editor.link.dialog.link.placeholder': string;
1008
- 'editor.link.dialog.text.placeholder': string;
1009
- 'editor.link.dialog.button.apply': string;
1010
- 'editor.image.tooltip': string;
1011
- 'editor.image.dragger.tooltip': string;
1012
- 'editor.image.float.left.tooltip': string;
1013
- 'editor.image.float.none.tooltip': string;
1014
- 'editor.image.float.right.tooltip': string;
1015
- 'editor.image.dialog.title': string;
1016
- 'editor.image.dialog.tab.url': string;
1017
- 'editor.image.dialog.tab.upload': string;
1018
- 'editor.link.dialog.inline': string;
1019
- 'editor.image.dialog.tab.uploadCrop': string;
1020
- 'editor.image.dialog.uploading': string;
1021
- 'editor.image.dialog.form.link': string;
1022
- 'editor.image.dialog.placeholder': string;
1023
- 'editor.image.dialog.form.alt': string;
1024
- 'editor.image.dialog.form.aspectRatio': string;
1025
- 'editor.image.dialog.form.file': string;
1026
- 'editor.image.dialog.button.apply': string;
1027
- 'editor.video.tooltip': string;
1028
- 'editor.video.dialog.tab.upload': string;
1029
- 'editor.video.dialog.uploading': string;
1030
- 'editor.video.dialog.title': string;
1031
- 'editor.video.dialog.link': string;
1032
- 'editor.video.dialog.placeholder': string;
1033
- 'editor.video.dialog.button.apply': string;
1034
- 'editor.table.tooltip': string;
1035
- 'editor.table.menu.insert_table': string;
1036
- 'editor.table.menu.insert_table.with_header_row': string;
1037
- 'editor.table.menu.add_column_before': string;
1038
- 'editor.table.menu.add_column_after': string;
1039
- 'editor.table.menu.delete_column': string;
1040
- 'editor.table.menu.add_row_before': string;
1041
- 'editor.table.menu.add_row_after': string;
1042
- 'editor.table.menu.delete_row': string;
1043
- 'editor.table.menu.merge_or_split_cells': string;
1044
- 'editor.table.menu.delete_table': string;
1045
- 'editor.blockquote.tooltip': string;
1046
- 'editor.horizontalrule.tooltip': string;
1047
- 'editor.code.tooltip': string;
1048
- 'editor.codeblock.tooltip': string;
1049
- 'editor.clear.tooltip': string;
1050
- 'editor.undo.tooltip': string;
1051
- 'editor.redo.tooltip': string;
1052
- 'editor.fullscreen.tooltip.fullscreen': string;
1053
- 'editor.fullscreen.tooltip.exit': string;
1054
- 'editor.imageUpload.cancel': string;
1055
- 'editor.imageUpload.crop': string;
1056
- 'editor.imageUpload.fileTypeNotSupported': string;
1057
- 'editor.imageUpload.fileSizeTooBig': string;
1058
- 'editor.table.menu.insertColumnBefore': string;
1059
- 'editor.table.menu.insertColumnAfter': string;
1060
- 'editor.table.menu.deleteColumn': string;
1061
- 'editor.table.menu.insertRowAbove': string;
1062
- 'editor.table.menu.insertRowBelow': string;
1063
- 'editor.table.menu.deleteRow': string;
1064
- 'editor.table.menu.mergeCells': string;
1065
- 'editor.table.menu.splitCells': string;
1066
- 'editor.table.menu.deleteTable': string;
1067
- 'editor.table.menu.setCellsBgColor': string;
1068
- 'editor.emoji.tooltip': string;
1069
- 'editor.iframe.tooltip': string;
1070
- 'editor.searchAndReplace.tooltip': string;
1071
- 'editor.search.dialog.text': string;
1072
- 'editor.replace.dialog.text': string;
1073
- 'editor.replaceAll.dialog.text': string;
1074
- 'editor.previous.dialog.text': string;
1075
- 'editor.next.dialog.text': string;
1076
- no_result_found: string;
1077
- 'Smileys & People': string;
1078
- 'Animals & Nature': string;
1079
- 'Food & Drink': string;
1080
- Activity: string;
1081
- 'Travel & Places': string;
1082
- Object: string;
1083
- Symbol: string;
1084
- Flags: string;
1085
- 'Frequently used': string;
1086
- 'editor.formula.dialog.text': string;
1087
- 'editor.katex.tooltip': string;
1088
- 'editor.exportPdf.tooltip': string;
1089
- 'editor.exportWord.tooltip': string;
1090
- 'editor.importWrod.tooltip': string;
1091
- 'editor.textDirection.tooltip': string;
1092
- 'editor.textDirection.auto.tooltip': string;
1093
- 'editor.textDirection.ltr.tooltip': string;
1094
- 'editor.textDirection.rtl.tooltip': string;
1095
- 'editor.attachment.tooltip': string;
1096
- 'editor.attachment.uploading': string;
1097
- 'editor.attachment.please_upload': string;
1098
- 'editor.imageGif.tooltip': string;
1099
- 'editor.replace.caseSensitive': string;
1100
- 'editor.mermaid.tooltip': string;
1101
- 'editor.twitter.tooltip': string;
1102
- 'editor.tooltip.flipX': string;
1103
- 'editor.tooltip.flipY': string;
1104
- };
1105
-
1106
- declare interface Result {
1107
- from: number;
1108
- to: number;
1109
- }
1110
-
1111
125
  /**
1112
126
  * Interface for RichTextEditor component props
1113
127
  */
@@ -1148,169 +162,35 @@ declare interface RichTextEditorProps {
1148
162
  onChangeContent?: (val: any) => void;
1149
163
  /** Bubble menu props */
1150
164
  bubbleMenu?: BubbleMenuProps;
165
+ /** Toolbar props */
166
+ toolbar?: ToolbarProps;
1151
167
  /** Use editor options */
1152
168
  useEditorOptions?: UseEditorOptions;
1153
169
  /** Use editor options */
1154
170
  resetCSS?: boolean;
1155
171
  }
1156
172
 
1157
- export declare const SearchAndReplace: Extension<SearchOptions, SearchStorage>;
1158
-
1159
- declare interface SearchOptions extends GeneralOptions<SearchOptions> {
1160
- searchTerm: string;
1161
- replaceTerm: string;
1162
- searchResultClass: string;
1163
- searchResultCurrentClass: string;
1164
- caseSensitive: boolean;
1165
- disableRegex: boolean;
1166
- onChange?: () => void;
1167
- }
1168
-
1169
- declare interface SearchStorage {
1170
- results: Result[];
1171
- currentIndex: number;
1172
- }
1173
-
1174
- export declare interface SetImageAttrsOptions {
1175
- src?: string;
1176
- /** The alternative text for the image. */
1177
- alt?: string;
1178
- /** The caption of the image. */
1179
- caption?: string;
1180
- /** The width of the image. */
1181
- width?: number | string | null;
1182
- /** The alignment of the image. */
1183
- align?: 'left' | 'center' | 'right';
1184
- /** Whether the image is inline. */
1185
- inline?: boolean;
1186
- /** image FlipX */
1187
- flipX?: boolean;
1188
- /** image FlipY */
1189
- flipY?: boolean;
1190
- }
1191
-
1192
- export declare const SlashCommand: Extension<any, any>;
1193
-
1194
- export declare const Strike: Mark<StrikeOptions, any>;
1195
-
1196
- export declare interface StrikeOptions extends StrikeOptions_2, GeneralOptions<StrikeOptions> {
1197
- }
1198
-
1199
- export declare const SubAndSuperScript: Extension<SubAndSuperScriptOptions, any>;
1200
-
1201
173
  /**
1202
- * Represents the interface for subscript and superscript options, extending GeneralOptions.
174
+ * Represents the ToolbarItemProps.
1203
175
  */
1204
- export declare interface SubAndSuperScriptOptions extends GeneralOptions<SubAndSuperScriptOptions> {
1205
- /**
1206
- * subscript options or false, indicating whether subscript is enabled
1207
- *
1208
- * @default true
1209
- */
1210
- subscript: Partial<SubscriptExtensionOptions> | false;
1211
- /**
1212
- * superscript options or false, indicating whether superscript is enabled
1213
- *
1214
- * @default true
1215
- */
1216
- superscript: Partial<SuperscriptExtensionOptions> | false;
1217
- }
1218
-
1219
- export declare const Table: Node_2<TableOptions, any>;
1220
-
1221
- declare interface TableCellBackgroundOptions {
1222
- HTMLAttributes: Record<string, any>;
1223
- types?: any;
1224
- }
1225
-
1226
- export declare const TableOfContents: Node_2<Options, any>;
1227
-
1228
- export declare interface TableOptions extends GeneralOptions<TableOptions> {
1229
- HTMLAttributes: Record<string, any>;
1230
- resizable: boolean;
1231
- handleWidth: number;
1232
- cellMinWidth: number;
1233
- lastColumnResizable: boolean;
1234
- allowTableNodeSelection: boolean;
1235
- /** options for table rows */
1236
- tableRow: Partial<TableRowOptions>;
1237
- /** options for table headers */
1238
- tableHeader: Partial<TableHeaderOptions>;
1239
- /** options for table cells */
1240
- tableCell: Partial<TableCellOptions>;
1241
- /** options for table cell background */
1242
- tableCellBackground: Partial<TableCellBackgroundOptions>;
1243
- }
1244
-
1245
- export declare const TaskList: Node_2<TaskListOptions, any>;
1246
-
1247
- /**
1248
- * Represents the interface for task list options, extending TiptapTaskListOptions and GeneralOptions.
1249
- */
1250
- export declare interface TaskListOptions extends TaskListOptions_2, GeneralOptions<TaskListOptions> {
1251
- /** options for task items */
1252
- taskItem: Partial<TaskItemOptions>;
1253
- }
1254
-
1255
- export declare const TextAlign: Extension<TextAlignOptions, any>;
1256
-
1257
- /**
1258
- * Represents the interface for text align options, extending TiptapTextAlignOptions and GeneralOptions.
1259
- */
1260
- export declare interface TextAlignOptions extends TextAlignOptions_2, GeneralOptions<TextAlignOptions> {
1261
- /**
1262
- * List of available alignment options
1263
- *
1264
- * @default ['left', 'center', 'right', 'justify']
1265
- */
1266
- alignments: Alignments[];
1267
- }
1268
-
1269
- declare interface TextBubbleOptions extends GeneralOptions<TextBubbleOptions> {
1270
- }
1271
-
1272
- export declare const TextDirection: Extension<any, any>;
1273
-
1274
- /**
1275
- * Extension based on:
1276
- * - https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/extensions/TrailingNode.js
1277
- * - https://github.com/remirror/remirror/blob/e0f1bec4a1e8073ce8f5500d62193e52321155b9/packages/prosemirror-trailing-node/src/trailing-node-plugin.ts
1278
- */
1279
- declare interface TrailingNodeOptions {
1280
- node: string;
1281
- notAfter: string[];
176
+ declare interface ToolbarItemProps {
177
+ button: {
178
+ component: React.ComponentType<any>;
179
+ componentProps: Record<string, any>;
180
+ };
181
+ divider: boolean;
182
+ spacer: boolean;
183
+ type: string;
184
+ name: string;
1282
185
  }
1283
186
 
1284
- /**
1285
- * This extension adds support for tweets.
1286
- */
1287
- export declare const Twitter: Node_2<TwitterOptions, any>;
1288
-
1289
- declare interface TwitterOptions {
1290
- /**
1291
- * Controls if the paste handler for tweets should be added.
1292
- * @default true
1293
- * @example false
1294
- */
1295
- addPasteHandler: boolean;
1296
- HTMLAttributes: Record<string, any>;
1297
- /**
1298
- * Controls if the twitter node should be inline or not.
1299
- * @default false
1300
- * @example true
1301
- */
1302
- inline: boolean;
1303
- /**
1304
- * The origin of the tweet.
1305
- * @default ''
1306
- * @example 'https://tiptap.dev'
1307
- */
1308
- origin: string;
187
+ declare interface ToolbarProps {
188
+ render?: (props: ToolbarRenderProps, toolbarItems: ToolbarItemProps[], dom: JSX.Element[], containerDom: (innerContent: React.ReactNode) => React.ReactNode) => React.ReactNode;
1309
189
  }
1310
190
 
1311
- export declare const Underline: Mark<UnderlineOptions, any>;
1312
-
1313
- export declare interface UnderlineOptions extends UnderlineOptions_2, GeneralOptions<UnderlineOptions> {
191
+ declare interface ToolbarRenderProps {
192
+ editor: Editor;
193
+ disabled: boolean;
1314
194
  }
1315
195
 
1316
196
  export { UseEditorOptions }
@@ -1325,378 +205,6 @@ export declare interface UseEditorStateReturn {
1325
205
  }>;
1326
206
  }
1327
207
 
1328
- export declare const vi: {
1329
- 'editor.remove': string;
1330
- 'editor.copy': string;
1331
- 'editor.words': string;
1332
- 'editor.characters': string;
1333
- 'editor.default': string;
1334
- 'editor.recent': string;
1335
- 'editor.nofill': string;
1336
- 'editor.format': string;
1337
- 'editor.delete': string;
1338
- 'editor.edit': string;
1339
- 'editor.settings': string;
1340
- 'editor.table_of_content': string;
1341
- 'editor.draghandle.tooltip': string;
1342
- 'editor.copyToClipboard': string;
1343
- 'editor.importWord.tooltip': string;
1344
- 'editor.slash': string;
1345
- 'editor.slash.empty': string;
1346
- 'editor.slash.format': string;
1347
- 'editor.slash.insert': string;
1348
- 'editor.slash.embed': string;
1349
- 'editor.content': string;
1350
- 'editor.moremark': string;
1351
- 'editor.size.small.tooltip': string;
1352
- 'editor.fontFamily.tooltip': string;
1353
- 'editor.fontFamily.default.tooltip': string;
1354
- 'editor.size.medium.tooltip': string;
1355
- 'editor.size.large.tooltip': string;
1356
- 'editor.bold.tooltip': string;
1357
- 'editor.italic.tooltip': string;
1358
- 'editor.underline.tooltip': string;
1359
- 'editor.strike.tooltip': string;
1360
- 'editor.color.tooltip': string;
1361
- 'editor.color.more': string;
1362
- 'editor.highlight.tooltip': string;
1363
- 'editor.lineheight.tooltip': string;
1364
- 'editor.heading.tooltip': string;
1365
- 'editor.heading.h1.tooltip': string;
1366
- 'editor.heading.h2.tooltip': string;
1367
- 'editor.heading.h3.tooltip': string;
1368
- 'editor.heading.h4.tooltip': string;
1369
- 'editor.heading.h5.tooltip': string;
1370
- 'editor.heading.h6.tooltip': string;
1371
- 'editor.paragraph.tooltip': string;
1372
- 'editor.textalign.tooltip': string;
1373
- 'editor.textalign.left.tooltip': string;
1374
- 'editor.textalign.center.tooltip': string;
1375
- 'editor.textalign.right.tooltip': string;
1376
- 'editor.textalign.justify.tooltip': string;
1377
- 'editor.indent': string;
1378
- 'editor.indent.indent': string;
1379
- 'editor.indent.outdent': string;
1380
- 'editor.fontSize.tooltip': string;
1381
- 'editor.fontSize.default.tooltip': string;
1382
- 'editor.superscript.tooltip': string;
1383
- 'editor.subscript.tooltip': string;
1384
- 'editor.bulletlist.tooltip': string;
1385
- 'editor.orderedlist.tooltip': string;
1386
- 'editor.tasklist.tooltip': string;
1387
- 'editor.indent.tooltip': string;
1388
- 'editor.outdent.tooltip': string;
1389
- 'editor.columns.tooltip': string;
1390
- 'editor.link.tooltip': string;
1391
- 'editor.link.unlink.tooltip': string;
1392
- 'editor.link.open.tooltip': string;
1393
- 'editor.link.edit.tooltip': string;
1394
- 'editor.link.dialog.title': string;
1395
- 'editor.link.dialog.link': string;
1396
- 'editor.link.dialog.text': string;
1397
- 'editor.link.dialog.openInNewTab': string;
1398
- 'editor.link.dialog.link.placeholder': string;
1399
- 'editor.link.dialog.text.placeholder': string;
1400
- 'editor.link.dialog.button.apply': string;
1401
- 'editor.image.tooltip': string;
1402
- 'editor.image.dragger.tooltip': string;
1403
- 'editor.image.float.left.tooltip': string;
1404
- 'editor.image.float.none.tooltip': string;
1405
- 'editor.image.float.right.tooltip': string;
1406
- 'editor.image.dialog.title': string;
1407
- 'editor.image.dialog.tab.url': string;
1408
- 'editor.image.dialog.tab.upload': string;
1409
- 'editor.link.dialog.inline': string;
1410
- 'editor.image.dialog.tab.uploadCrop': string;
1411
- 'editor.image.dialog.uploading': string;
1412
- 'editor.image.dialog.form.link': string;
1413
- 'editor.image.dialog.placeholder': string;
1414
- 'editor.image.dialog.form.alt': string;
1415
- 'editor.image.dialog.form.aspectRatio': string;
1416
- 'editor.image.dialog.form.file': string;
1417
- 'editor.image.dialog.button.apply': string;
1418
- 'editor.video.tooltip': string;
1419
- 'editor.video.dialog.tab.upload': string;
1420
- 'editor.video.dialog.uploading': string;
1421
- 'editor.video.dialog.title': string;
1422
- 'editor.video.dialog.link': string;
1423
- 'editor.video.dialog.placeholder': string;
1424
- 'editor.video.dialog.button.apply': string;
1425
- 'editor.table.tooltip': string;
1426
- 'editor.table.menu.insert_table': string;
1427
- 'editor.table.menu.insert_table.with_header_row': string;
1428
- 'editor.table.menu.add_column_before': string;
1429
- 'editor.table.menu.add_column_after': string;
1430
- 'editor.table.menu.delete_column': string;
1431
- 'editor.table.menu.add_row_before': string;
1432
- 'editor.table.menu.add_row_after': string;
1433
- 'editor.table.menu.delete_row': string;
1434
- 'editor.table.menu.merge_or_split_cells': string;
1435
- 'editor.table.menu.delete_table': string;
1436
- 'editor.blockquote.tooltip': string;
1437
- 'editor.horizontalrule.tooltip': string;
1438
- 'editor.code.tooltip': string;
1439
- 'editor.codeblock.tooltip': string;
1440
- 'editor.clear.tooltip': string;
1441
- 'editor.undo.tooltip': string;
1442
- 'editor.redo.tooltip': string;
1443
- 'editor.fullscreen.tooltip.fullscreen': string;
1444
- 'editor.fullscreen.tooltip.exit': string;
1445
- 'editor.imageUpload.cancel': string;
1446
- 'editor.imageUpload.crop': string;
1447
- 'editor.imageUpload.fileTypeNotSupported': string;
1448
- 'editor.imageUpload.fileSizeTooBig': string;
1449
- 'editor.table.menu.insertColumnBefore': string;
1450
- 'editor.table.menu.insertColumnAfter': string;
1451
- 'editor.table.menu.deleteColumn': string;
1452
- 'editor.table.menu.insertRowAbove': string;
1453
- 'editor.table.menu.insertRowBelow': string;
1454
- 'editor.table.menu.deleteRow': string;
1455
- 'editor.table.menu.mergeCells': string;
1456
- 'editor.table.menu.splitCells': string;
1457
- 'editor.table.menu.deleteTable': string;
1458
- 'editor.table.menu.setCellsBgColor': string;
1459
- 'editor.emoji.tooltip': string;
1460
- 'editor.iframe.tooltip': string;
1461
- 'editor.searchAndReplace.tooltip': string;
1462
- 'editor.search.dialog.text': string;
1463
- 'editor.replace.dialog.text': string;
1464
- 'editor.replaceAll.dialog.text': string;
1465
- 'editor.previous.dialog.text': string;
1466
- 'editor.next.dialog.text': string;
1467
- no_result_found: string;
1468
- 'Smileys & People': string;
1469
- 'Animals & Nature': string;
1470
- 'Food & Drink': string;
1471
- Activity: string;
1472
- 'Travel & Places': string;
1473
- Object: string;
1474
- Symbol: string;
1475
- Flags: string;
1476
- 'Frequently used': string;
1477
- 'editor.formula.dialog.text': string;
1478
- 'editor.katex.tooltip': string;
1479
- 'editor.exportPdf.tooltip': string;
1480
- 'editor.exportWord.tooltip': string;
1481
- 'editor.importWrod.tooltip': string;
1482
- 'editor.textDirection.tooltip': string;
1483
- 'editor.textDirection.auto.tooltip': string;
1484
- 'editor.textDirection.ltr.tooltip': string;
1485
- 'editor.textDirection.rtl.tooltip': string;
1486
- 'editor.attachment.tooltip': string;
1487
- 'editor.attachment.uploading': string;
1488
- 'editor.attachment.please_upload': string;
1489
- 'editor.imageGif.tooltip': string;
1490
- 'editor.replace.caseSensitive': string;
1491
- 'editor.mermaid.tooltip': string;
1492
- 'editor.twitter.tooltip': string;
1493
- 'editor.tooltip.flipX': string;
1494
- 'editor.tooltip.flipY': string;
1495
- };
1496
-
1497
- export declare const Video: Node_2<VideoOptions, any>;
1498
-
1499
- /**
1500
- * Represents the interface for video options, extending GeneralOptions.
1501
- */
1502
- export declare interface VideoOptions extends GeneralOptions<VideoOptions> {
1503
- /**
1504
- * Indicates whether fullscreen play is allowed
1505
- *
1506
- * @default true
1507
- */
1508
- allowFullscreen: boolean;
1509
- /**
1510
- * Indicates whether to display the frameborder
1511
- *
1512
- * @default false
1513
- */
1514
- frameborder: boolean;
1515
- /**
1516
- * Width of the video, can be a number or string
1517
- *
1518
- * @default VIDEO_SIZE['size-medium']
1519
- */
1520
- width: number | string;
1521
- /** HTML attributes object for passing additional attributes */
1522
- HTMLAttributes: {
1523
- [key: string]: any;
1524
- };
1525
- /** Function for uploading files */
1526
- upload?: (file: File) => Promise<string>;
1527
- /** The source URL of the video */
1528
- resourceVideo: 'upload' | 'link' | 'both';
1529
- }
1530
-
1531
- export declare const zh_CN: {
1532
- 'editor.remove': string;
1533
- 'editor.copy': string;
1534
- 'editor.words': string;
1535
- 'editor.characters': string;
1536
- 'editor.default': string;
1537
- 'editor.recent': string;
1538
- 'editor.nofill': string;
1539
- 'editor.format': string;
1540
- 'editor.delete': string;
1541
- 'editor.edit': string;
1542
- 'editor.settings': string;
1543
- 'editor.table_of_content': string;
1544
- 'editor.draghandle.tooltip': string;
1545
- 'editor.copyToClipboard': string;
1546
- 'editor.importWord.tooltip': string;
1547
- 'editor.slash': string;
1548
- 'editor.slash.empty': string;
1549
- 'editor.slash.format': string;
1550
- 'editor.slash.insert': string;
1551
- 'editor.slash.embed': string;
1552
- 'editor.content': string;
1553
- 'editor.fontFamily.tooltip': string;
1554
- 'editor.fontFamily.default.tooltip': string;
1555
- 'editor.moremark': string;
1556
- 'editor.size.small.tooltip': string;
1557
- 'editor.size.medium.tooltip': string;
1558
- 'editor.size.large.tooltip': string;
1559
- 'editor.bold.tooltip': string;
1560
- 'editor.italic.tooltip': string;
1561
- 'editor.underline.tooltip': string;
1562
- 'editor.strike.tooltip': string;
1563
- 'editor.color.tooltip': string;
1564
- 'editor.color.more': string;
1565
- 'editor.highlight.tooltip': string;
1566
- 'editor.lineheight.tooltip': string;
1567
- 'editor.heading.tooltip': string;
1568
- 'editor.heading.h1.tooltip': string;
1569
- 'editor.heading.h2.tooltip': string;
1570
- 'editor.heading.h3.tooltip': string;
1571
- 'editor.heading.h4.tooltip': string;
1572
- 'editor.heading.h5.tooltip': string;
1573
- 'editor.heading.h6.tooltip': string;
1574
- 'editor.paragraph.tooltip': string;
1575
- 'editor.textalign.tooltip': string;
1576
- 'editor.textalign.left.tooltip': string;
1577
- 'editor.textalign.center.tooltip': string;
1578
- 'editor.textalign.right.tooltip': string;
1579
- 'editor.textalign.justify.tooltip': string;
1580
- 'editor.indent': string;
1581
- 'editor.indent.indent': string;
1582
- 'editor.indent.outdent': string;
1583
- 'editor.fontSize.tooltip': string;
1584
- 'editor.fontSize.default.tooltip': string;
1585
- 'editor.superscript.tooltip': string;
1586
- 'editor.subscript.tooltip': string;
1587
- 'editor.bulletlist.tooltip': string;
1588
- 'editor.orderedlist.tooltip': string;
1589
- 'editor.tasklist.tooltip': string;
1590
- 'editor.indent.tooltip': string;
1591
- 'editor.outdent.tooltip': string;
1592
- 'editor.columns.tooltip': string;
1593
- 'editor.link.tooltip': string;
1594
- 'editor.link.unlink.tooltip': string;
1595
- 'editor.link.open.tooltip': string;
1596
- 'editor.link.edit.tooltip': string;
1597
- 'editor.link.dialog.title': string;
1598
- 'editor.link.dialog.link': string;
1599
- 'editor.link.dialog.text': string;
1600
- 'editor.link.dialog.openInNewTab': string;
1601
- 'editor.link.dialog.link.placeholder': string;
1602
- 'editor.link.dialog.text.placeholder': string;
1603
- 'editor.link.dialog.button.apply': string;
1604
- 'editor.image.tooltip': string;
1605
- 'editor.image.dragger.tooltip': string;
1606
- 'editor.image.float.left.tooltip': string;
1607
- 'editor.image.float.none.tooltip': string;
1608
- 'editor.image.float.right.tooltip': string;
1609
- 'editor.image.dialog.title': string;
1610
- 'editor.image.dialog.tab.url': string;
1611
- 'editor.image.dialog.tab.upload': string;
1612
- 'editor.link.dialog.inline': string;
1613
- 'editor.image.dialog.uploading': string;
1614
- 'editor.image.dialog.form.link': string;
1615
- 'editor.image.dialog.placeholder': string;
1616
- 'editor.image.dialog.form.alt': string;
1617
- 'editor.image.dialog.form.aspectRatio': string;
1618
- 'editor.image.dialog.form.file': string;
1619
- 'editor.image.dialog.button.apply': string;
1620
- 'editor.video.tooltip': string;
1621
- 'editor.video.dialog.tab.upload': string;
1622
- 'editor.image.dialog.tab.uploadCrop': string;
1623
- 'editor.video.dialog.uploading': string;
1624
- 'editor.video.dialog.title': string;
1625
- 'editor.video.dialog.link': string;
1626
- 'editor.video.dialog.placeholder': string;
1627
- 'editor.video.dialog.button.apply': string;
1628
- 'editor.table.tooltip': string;
1629
- 'editor.table.menu.insert_table': string;
1630
- 'editor.table.menu.insert_table.with_header_row': string;
1631
- 'editor.table.menu.add_column_before': string;
1632
- 'editor.table.menu.add_column_after': string;
1633
- 'editor.table.menu.delete_column': string;
1634
- 'editor.table.menu.add_row_before': string;
1635
- 'editor.table.menu.add_row_after': string;
1636
- 'editor.table.menu.delete_row': string;
1637
- 'editor.table.menu.merge_or_split_cells': string;
1638
- 'editor.table.menu.delete_table': string;
1639
- 'editor.blockquote.tooltip': string;
1640
- 'editor.horizontalrule.tooltip': string;
1641
- 'editor.code.tooltip': string;
1642
- 'editor.codeblock.tooltip': string;
1643
- 'editor.clear.tooltip': string;
1644
- 'editor.undo.tooltip': string;
1645
- 'editor.redo.tooltip': string;
1646
- 'editor.fullscreen.tooltip.fullscreen': string;
1647
- 'editor.fullscreen.tooltip.exit': string;
1648
- 'editor.imageUpload.cancel': string;
1649
- 'editor.imageUpload.crop': string;
1650
- 'editor.imageUpload.fileTypeNotSupported': string;
1651
- 'editor.imageUpload.fileSizeTooBig': string;
1652
- 'editor.table.menu.insertColumnBefore': string;
1653
- 'editor.table.menu.insertColumnAfter': string;
1654
- 'editor.table.menu.deleteColumn': string;
1655
- 'editor.table.menu.insertRowAbove': string;
1656
- 'editor.table.menu.insertRowBelow': string;
1657
- 'editor.table.menu.deleteRow': string;
1658
- 'editor.table.menu.mergeCells': string;
1659
- 'editor.table.menu.splitCells': string;
1660
- 'editor.table.menu.deleteTable': string;
1661
- 'editor.table.menu.setCellsBgColor': string;
1662
- 'editor.emoji.tooltip': string;
1663
- 'editor.iframe.tooltip': string;
1664
- 'editor.searchAndReplace.tooltip': string;
1665
- 'editor.search.dialog.text': string;
1666
- 'editor.replace.dialog.text': string;
1667
- 'editor.replaceAll.dialog.text': string;
1668
- 'editor.previous.dialog.text': string;
1669
- 'editor.next.dialog.text': string;
1670
- no_result_found: string;
1671
- 'Smileys & People': string;
1672
- 'Animals & Nature': string;
1673
- 'Food & Drink': string;
1674
- Activity: string;
1675
- 'Travel & Places': string;
1676
- Object: string;
1677
- Symbol: string;
1678
- Flags: string;
1679
- 'Frequently used': string;
1680
- 'editor.formula.dialog.text': string;
1681
- 'editor.katex.tooltip': string;
1682
- 'editor.exportPdf.tooltip': string;
1683
- 'editor.exportWord.tooltip': string;
1684
- 'editor.importWrod.tooltip': string;
1685
- 'editor.textDirection.tooltip': string;
1686
- 'editor.textDirection.auto.tooltip': string;
1687
- 'editor.textDirection.ltr.tooltip': string;
1688
- 'editor.textDirection.rtl.tooltip': string;
1689
- 'editor.attachment.tooltip': string;
1690
- 'editor.attachment.uploading': string;
1691
- 'editor.attachment.please_upload': string;
1692
- 'editor.imageGif.tooltip': string;
1693
- 'editor.replace.caseSensitive': string;
1694
- 'editor.mermaid.tooltip': string;
1695
- 'editor.twitter.tooltip': string;
1696
- 'editor.tooltip.flipX': string;
1697
- 'editor.tooltip.flipY': string;
1698
- };
1699
-
1700
208
  export { }
1701
209
 
1702
210
 
@@ -1760,6 +268,16 @@ declare module '@tiptap/core' {
1760
268
  }
1761
269
 
1762
270
 
271
+ declare module '@tiptap/core' {
272
+ interface Commands<ReturnType> {
273
+ tableCellBackground: {
274
+ setTableCellBackground: (color: string) => ReturnType;
275
+ unsetTableCellBackground: () => ReturnType;
276
+ };
277
+ }
278
+ }
279
+
280
+
1763
281
  declare module '@tiptap/core' {
1764
282
  interface Commands<ReturnType> {
1765
283
  imageUpload: {
@@ -1782,9 +300,29 @@ declare module '@tiptap/core' {
1782
300
 
1783
301
  declare module '@tiptap/core' {
1784
302
  interface Commands<ReturnType> {
1785
- tableCellBackground: {
1786
- setTableCellBackground: (color: string) => ReturnType;
1787
- unsetTableCellBackground: () => ReturnType;
303
+ search: {
304
+ setSearchTerm: (searchTerm: string) => ReturnType;
305
+ setReplaceTerm: (replaceTerm: string) => ReturnType;
306
+ replace: () => ReturnType;
307
+ replaceAll: () => ReturnType;
308
+ goToPrevSearchResult: () => void;
309
+ goToNextSearchResult: () => void;
310
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
311
+ };
312
+ }
313
+ }
314
+
315
+
316
+ declare module '@tiptap/core' {
317
+ interface Commands<ReturnType> {
318
+ iframe: {
319
+ /**
320
+ * Add an iframe
321
+ */
322
+ setIframe: (options: {
323
+ src: string;
324
+ service: string;
325
+ }) => ReturnType;
1788
326
  };
1789
327
  }
1790
328
  }
@@ -1813,21 +351,6 @@ declare module '@tiptap/core' {
1813
351
  }
1814
352
 
1815
353
 
1816
- declare module '@tiptap/core' {
1817
- interface Commands<ReturnType> {
1818
- iframe: {
1819
- /**
1820
- * Add an iframe
1821
- */
1822
- setIframe: (options: {
1823
- src: string;
1824
- service: string;
1825
- }) => ReturnType;
1826
- };
1827
- }
1828
- }
1829
-
1830
-
1831
354
  declare module '@tiptap/core' {
1832
355
  interface Commands<ReturnType> {
1833
356
  emoji: {
@@ -1842,14 +365,8 @@ declare module '@tiptap/core' {
1842
365
 
1843
366
  declare module '@tiptap/core' {
1844
367
  interface Commands<ReturnType> {
1845
- search: {
1846
- setSearchTerm: (searchTerm: string) => ReturnType;
1847
- setReplaceTerm: (replaceTerm: string) => ReturnType;
1848
- replace: () => ReturnType;
1849
- replaceAll: () => ReturnType;
1850
- goToPrevSearchResult: () => void;
1851
- goToNextSearchResult: () => void;
1852
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
368
+ katex: {
369
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
1853
370
  };
1854
371
  }
1855
372
  }
@@ -1857,8 +374,8 @@ declare module '@tiptap/core' {
1857
374
 
1858
375
  declare module '@tiptap/core' {
1859
376
  interface Commands<ReturnType> {
1860
- katex: {
1861
- setKatex: (arg?: IKatexAttrs) => ReturnType;
377
+ exportWord: {
378
+ exportToWord: () => ReturnType;
1862
379
  };
1863
380
  }
1864
381
  }
@@ -1866,9 +383,8 @@ declare module '@tiptap/core' {
1866
383
 
1867
384
  declare module '@tiptap/core' {
1868
385
  interface Commands<ReturnType> {
1869
- tableOfContents: {
1870
- setTableOfContents: () => ReturnType;
1871
- removeTableOfContents: () => ReturnType;
386
+ excalidraw: {
387
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1872
388
  };
1873
389
  }
1874
390
  }
@@ -1876,8 +392,9 @@ declare module '@tiptap/core' {
1876
392
 
1877
393
  declare module '@tiptap/core' {
1878
394
  interface Commands<ReturnType> {
1879
- attachment: {
1880
- setAttachment: (attrs?: unknown) => ReturnType;
395
+ tableOfContents: {
396
+ setTableOfContents: () => ReturnType;
397
+ removeTableOfContents: () => ReturnType;
1881
398
  };
1882
399
  }
1883
400
  }
@@ -1895,23 +412,19 @@ declare module '@tiptap/core' {
1895
412
 
1896
413
  declare module '@tiptap/core' {
1897
414
  interface Commands<ReturnType> {
1898
- twitter: {
415
+ imageGifUpload: {
1899
416
  /**
1900
- * Insert a tweet
1901
- * @param options The tweet attributes
1902
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
417
+ * Add an image gif
1903
418
  */
1904
- setTweet: (options: SetTweetOptions) => ReturnType;
1905
- updateTweet: (options: SetTweetOptions) => ReturnType;
1906
- };
1907
- }
1908
- }
1909
-
1910
-
1911
- declare module '@tiptap/core' {
1912
- interface Commands<ReturnType> {
1913
- excalidraw: {
1914
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
419
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
420
+ /**
421
+ * Update an image gif
422
+ */
423
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
424
+ /**
425
+ * Set image alignment
426
+ */
427
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
1915
428
  };
1916
429
  }
1917
430
  }
@@ -1919,8 +432,8 @@ declare module '@tiptap/core' {
1919
432
 
1920
433
  declare module '@tiptap/core' {
1921
434
  interface Commands<ReturnType> {
1922
- exportWord: {
1923
- exportToWord: () => ReturnType;
435
+ attachment: {
436
+ setAttachment: (attrs?: unknown) => ReturnType;
1924
437
  };
1925
438
  }
1926
439
  }
@@ -1928,19 +441,14 @@ declare module '@tiptap/core' {
1928
441
 
1929
442
  declare module '@tiptap/core' {
1930
443
  interface Commands<ReturnType> {
1931
- imageGifUpload: {
1932
- /**
1933
- * Add an image gif
1934
- */
1935
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1936
- /**
1937
- * Update an image gif
1938
- */
1939
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
444
+ twitter: {
1940
445
  /**
1941
- * Set image alignment
446
+ * Insert a tweet
447
+ * @param options The tweet attributes
448
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1942
449
  */
1943
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
450
+ setTweet: (options: SetTweetOptions) => ReturnType;
451
+ updateTweet: (options: SetTweetOptions) => ReturnType;
1944
452
  };
1945
453
  }
1946
454
  }