reactjs-tiptap-editor 0.2.26 → 0.2.27

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.
@@ -755,6 +755,16 @@ declare module '@tiptap/core' {
755
755
  }
756
756
 
757
757
 
758
+ declare module '@tiptap/core' {
759
+ interface Commands<ReturnType> {
760
+ tableCellBackground: {
761
+ setTableCellBackground: (color: string) => ReturnType;
762
+ unsetTableCellBackground: () => ReturnType;
763
+ };
764
+ }
765
+ }
766
+
767
+
758
768
  declare module '@tiptap/core' {
759
769
  interface Commands<ReturnType> {
760
770
  imageUpload: {
@@ -775,15 +785,6 @@ declare module '@tiptap/core' {
775
785
  }
776
786
 
777
787
 
778
- declare module '@tiptap/core' {
779
- interface Commands<ReturnType> {
780
- painter: {
781
- setPainter: (marks: Mark[]) => ReturnType;
782
- };
783
- }
784
- }
785
-
786
-
787
788
  declare module '@tiptap/core' {
788
789
  interface Commands<ReturnType> {
789
790
  columns: {
@@ -800,14 +801,8 @@ declare module '@tiptap/core' {
800
801
 
801
802
  declare module '@tiptap/core' {
802
803
  interface Commands<ReturnType> {
803
- iframe: {
804
- /**
805
- * Add an iframe
806
- */
807
- setIframe: (options: {
808
- src: string;
809
- service: string;
810
- }) => ReturnType;
804
+ painter: {
805
+ setPainter: (marks: Mark[]) => ReturnType;
811
806
  };
812
807
  }
813
808
  }
@@ -815,9 +810,20 @@ declare module '@tiptap/core' {
815
810
 
816
811
  declare module '@tiptap/core' {
817
812
  interface Commands<ReturnType> {
818
- tableCellBackground: {
819
- setTableCellBackground: (color: string) => ReturnType;
820
- unsetTableCellBackground: () => ReturnType;
813
+ katex: {
814
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
815
+ };
816
+ }
817
+ }
818
+
819
+
820
+ declare module '@tiptap/core' {
821
+ interface Commands<ReturnType> {
822
+ emoji: {
823
+ setEmoji: (emoji: {
824
+ name: string;
825
+ emoji: string;
826
+ }) => ReturnType;
821
827
  };
822
828
  }
823
829
  }
@@ -840,8 +846,14 @@ declare module '@tiptap/core' {
840
846
 
841
847
  declare module '@tiptap/core' {
842
848
  interface Commands<ReturnType> {
843
- katex: {
844
- setKatex: (arg?: IKatexAttrs) => ReturnType;
849
+ iframe: {
850
+ /**
851
+ * Add an iframe
852
+ */
853
+ setIframe: (options: {
854
+ src: string;
855
+ service: string;
856
+ }) => ReturnType;
845
857
  };
846
858
  }
847
859
  }
@@ -849,11 +861,9 @@ declare module '@tiptap/core' {
849
861
 
850
862
  declare module '@tiptap/core' {
851
863
  interface Commands<ReturnType> {
852
- emoji: {
853
- setEmoji: (emoji: {
854
- name: string;
855
- emoji: string;
856
- }) => ReturnType;
864
+ tableOfContents: {
865
+ setTableOfContents: () => ReturnType;
866
+ removeTableOfContents: () => ReturnType;
857
867
  };
858
868
  }
859
869
  }
@@ -879,9 +889,8 @@ declare module '@tiptap/core' {
879
889
 
880
890
  declare module '@tiptap/core' {
881
891
  interface Commands<ReturnType> {
882
- tableOfContents: {
883
- setTableOfContents: () => ReturnType;
884
- removeTableOfContents: () => ReturnType;
892
+ attachment: {
893
+ setAttachment: (attrs?: unknown) => ReturnType;
885
894
  };
886
895
  }
887
896
  }
@@ -889,8 +898,14 @@ declare module '@tiptap/core' {
889
898
 
890
899
  declare module '@tiptap/core' {
891
900
  interface Commands<ReturnType> {
892
- attachment: {
893
- setAttachment: (attrs?: unknown) => ReturnType;
901
+ twitter: {
902
+ /**
903
+ * Insert a tweet
904
+ * @param options The tweet attributes
905
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
906
+ */
907
+ setTweet: (options: SetTweetOptions) => ReturnType;
908
+ updateTweet: (options: SetTweetOptions) => ReturnType;
894
909
  };
895
910
  }
896
911
  }
@@ -918,24 +933,9 @@ declare module '@tiptap/core' {
918
933
 
919
934
  declare module '@tiptap/core' {
920
935
  interface Commands<ReturnType> {
921
- mermaid: {
922
- setMermaid: (options: any, replace?: any) => ReturnType;
923
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
924
- };
925
- }
926
- }
927
-
928
-
929
- declare module '@tiptap/core' {
930
- interface Commands<ReturnType> {
931
- twitter: {
932
- /**
933
- * Insert a tweet
934
- * @param options The tweet attributes
935
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
936
- */
937
- setTweet: (options: SetTweetOptions) => ReturnType;
938
- updateTweet: (options: SetTweetOptions) => ReturnType;
936
+ drawer: {
937
+ setDrawer: (options: any, replace?: any) => ReturnType;
938
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
939
939
  };
940
940
  }
941
941
  }
@@ -943,9 +943,9 @@ declare module '@tiptap/core' {
943
943
 
944
944
  declare module '@tiptap/core' {
945
945
  interface Commands<ReturnType> {
946
- drawer: {
947
- setDrawer: (options: any, replace?: any) => ReturnType;
948
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
946
+ mermaid: {
947
+ setMermaid: (options: any, replace?: any) => ReturnType;
948
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
949
949
  };
950
950
  }
951
951
  }
@@ -755,6 +755,16 @@ declare module '@tiptap/core' {
755
755
  }
756
756
 
757
757
 
758
+ declare module '@tiptap/core' {
759
+ interface Commands<ReturnType> {
760
+ tableCellBackground: {
761
+ setTableCellBackground: (color: string) => ReturnType;
762
+ unsetTableCellBackground: () => ReturnType;
763
+ };
764
+ }
765
+ }
766
+
767
+
758
768
  declare module '@tiptap/core' {
759
769
  interface Commands<ReturnType> {
760
770
  imageUpload: {
@@ -775,15 +785,6 @@ declare module '@tiptap/core' {
775
785
  }
776
786
 
777
787
 
778
- declare module '@tiptap/core' {
779
- interface Commands<ReturnType> {
780
- painter: {
781
- setPainter: (marks: Mark[]) => ReturnType;
782
- };
783
- }
784
- }
785
-
786
-
787
788
  declare module '@tiptap/core' {
788
789
  interface Commands<ReturnType> {
789
790
  columns: {
@@ -800,14 +801,8 @@ declare module '@tiptap/core' {
800
801
 
801
802
  declare module '@tiptap/core' {
802
803
  interface Commands<ReturnType> {
803
- iframe: {
804
- /**
805
- * Add an iframe
806
- */
807
- setIframe: (options: {
808
- src: string;
809
- service: string;
810
- }) => ReturnType;
804
+ painter: {
805
+ setPainter: (marks: Mark[]) => ReturnType;
811
806
  };
812
807
  }
813
808
  }
@@ -815,9 +810,20 @@ declare module '@tiptap/core' {
815
810
 
816
811
  declare module '@tiptap/core' {
817
812
  interface Commands<ReturnType> {
818
- tableCellBackground: {
819
- setTableCellBackground: (color: string) => ReturnType;
820
- unsetTableCellBackground: () => ReturnType;
813
+ katex: {
814
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
815
+ };
816
+ }
817
+ }
818
+
819
+
820
+ declare module '@tiptap/core' {
821
+ interface Commands<ReturnType> {
822
+ emoji: {
823
+ setEmoji: (emoji: {
824
+ name: string;
825
+ emoji: string;
826
+ }) => ReturnType;
821
827
  };
822
828
  }
823
829
  }
@@ -840,8 +846,14 @@ declare module '@tiptap/core' {
840
846
 
841
847
  declare module '@tiptap/core' {
842
848
  interface Commands<ReturnType> {
843
- katex: {
844
- setKatex: (arg?: IKatexAttrs) => ReturnType;
849
+ iframe: {
850
+ /**
851
+ * Add an iframe
852
+ */
853
+ setIframe: (options: {
854
+ src: string;
855
+ service: string;
856
+ }) => ReturnType;
845
857
  };
846
858
  }
847
859
  }
@@ -849,11 +861,9 @@ declare module '@tiptap/core' {
849
861
 
850
862
  declare module '@tiptap/core' {
851
863
  interface Commands<ReturnType> {
852
- emoji: {
853
- setEmoji: (emoji: {
854
- name: string;
855
- emoji: string;
856
- }) => ReturnType;
864
+ tableOfContents: {
865
+ setTableOfContents: () => ReturnType;
866
+ removeTableOfContents: () => ReturnType;
857
867
  };
858
868
  }
859
869
  }
@@ -879,9 +889,8 @@ declare module '@tiptap/core' {
879
889
 
880
890
  declare module '@tiptap/core' {
881
891
  interface Commands<ReturnType> {
882
- tableOfContents: {
883
- setTableOfContents: () => ReturnType;
884
- removeTableOfContents: () => ReturnType;
892
+ attachment: {
893
+ setAttachment: (attrs?: unknown) => ReturnType;
885
894
  };
886
895
  }
887
896
  }
@@ -889,8 +898,14 @@ declare module '@tiptap/core' {
889
898
 
890
899
  declare module '@tiptap/core' {
891
900
  interface Commands<ReturnType> {
892
- attachment: {
893
- setAttachment: (attrs?: unknown) => ReturnType;
901
+ twitter: {
902
+ /**
903
+ * Insert a tweet
904
+ * @param options The tweet attributes
905
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
906
+ */
907
+ setTweet: (options: SetTweetOptions) => ReturnType;
908
+ updateTweet: (options: SetTweetOptions) => ReturnType;
894
909
  };
895
910
  }
896
911
  }
@@ -918,24 +933,9 @@ declare module '@tiptap/core' {
918
933
 
919
934
  declare module '@tiptap/core' {
920
935
  interface Commands<ReturnType> {
921
- mermaid: {
922
- setMermaid: (options: any, replace?: any) => ReturnType;
923
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
924
- };
925
- }
926
- }
927
-
928
-
929
- declare module '@tiptap/core' {
930
- interface Commands<ReturnType> {
931
- twitter: {
932
- /**
933
- * Insert a tweet
934
- * @param options The tweet attributes
935
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
936
- */
937
- setTweet: (options: SetTweetOptions) => ReturnType;
938
- updateTweet: (options: SetTweetOptions) => ReturnType;
936
+ drawer: {
937
+ setDrawer: (options: any, replace?: any) => ReturnType;
938
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
939
939
  };
940
940
  }
941
941
  }
@@ -943,9 +943,9 @@ declare module '@tiptap/core' {
943
943
 
944
944
  declare module '@tiptap/core' {
945
945
  interface Commands<ReturnType> {
946
- drawer: {
947
- setDrawer: (options: any, replace?: any) => ReturnType;
948
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
946
+ mermaid: {
947
+ setMermaid: (options: any, replace?: any) => ReturnType;
948
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
949
949
  };
950
950
  }
951
951
  }
package/lib/index.d.cts CHANGED
@@ -324,6 +324,16 @@ declare module '@tiptap/core' {
324
324
  }
325
325
 
326
326
 
327
+ declare module '@tiptap/core' {
328
+ interface Commands<ReturnType> {
329
+ tableCellBackground: {
330
+ setTableCellBackground: (color: string) => ReturnType;
331
+ unsetTableCellBackground: () => ReturnType;
332
+ };
333
+ }
334
+ }
335
+
336
+
327
337
  declare module '@tiptap/core' {
328
338
  interface Commands<ReturnType> {
329
339
  imageUpload: {
@@ -344,15 +354,6 @@ declare module '@tiptap/core' {
344
354
  }
345
355
 
346
356
 
347
- declare module '@tiptap/core' {
348
- interface Commands<ReturnType> {
349
- painter: {
350
- setPainter: (marks: Mark[]) => ReturnType;
351
- };
352
- }
353
- }
354
-
355
-
356
357
  declare module '@tiptap/core' {
357
358
  interface Commands<ReturnType> {
358
359
  columns: {
@@ -369,14 +370,8 @@ declare module '@tiptap/core' {
369
370
 
370
371
  declare module '@tiptap/core' {
371
372
  interface Commands<ReturnType> {
372
- iframe: {
373
- /**
374
- * Add an iframe
375
- */
376
- setIframe: (options: {
377
- src: string;
378
- service: string;
379
- }) => ReturnType;
373
+ painter: {
374
+ setPainter: (marks: Mark[]) => ReturnType;
380
375
  };
381
376
  }
382
377
  }
@@ -384,9 +379,20 @@ declare module '@tiptap/core' {
384
379
 
385
380
  declare module '@tiptap/core' {
386
381
  interface Commands<ReturnType> {
387
- tableCellBackground: {
388
- setTableCellBackground: (color: string) => ReturnType;
389
- unsetTableCellBackground: () => ReturnType;
382
+ katex: {
383
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
384
+ };
385
+ }
386
+ }
387
+
388
+
389
+ declare module '@tiptap/core' {
390
+ interface Commands<ReturnType> {
391
+ emoji: {
392
+ setEmoji: (emoji: {
393
+ name: string;
394
+ emoji: string;
395
+ }) => ReturnType;
390
396
  };
391
397
  }
392
398
  }
@@ -409,8 +415,14 @@ declare module '@tiptap/core' {
409
415
 
410
416
  declare module '@tiptap/core' {
411
417
  interface Commands<ReturnType> {
412
- katex: {
413
- setKatex: (arg?: IKatexAttrs) => ReturnType;
418
+ iframe: {
419
+ /**
420
+ * Add an iframe
421
+ */
422
+ setIframe: (options: {
423
+ src: string;
424
+ service: string;
425
+ }) => ReturnType;
414
426
  };
415
427
  }
416
428
  }
@@ -418,11 +430,9 @@ declare module '@tiptap/core' {
418
430
 
419
431
  declare module '@tiptap/core' {
420
432
  interface Commands<ReturnType> {
421
- emoji: {
422
- setEmoji: (emoji: {
423
- name: string;
424
- emoji: string;
425
- }) => ReturnType;
433
+ tableOfContents: {
434
+ setTableOfContents: () => ReturnType;
435
+ removeTableOfContents: () => ReturnType;
426
436
  };
427
437
  }
428
438
  }
@@ -448,9 +458,8 @@ declare module '@tiptap/core' {
448
458
 
449
459
  declare module '@tiptap/core' {
450
460
  interface Commands<ReturnType> {
451
- tableOfContents: {
452
- setTableOfContents: () => ReturnType;
453
- removeTableOfContents: () => ReturnType;
461
+ attachment: {
462
+ setAttachment: (attrs?: unknown) => ReturnType;
454
463
  };
455
464
  }
456
465
  }
@@ -458,8 +467,14 @@ declare module '@tiptap/core' {
458
467
 
459
468
  declare module '@tiptap/core' {
460
469
  interface Commands<ReturnType> {
461
- attachment: {
462
- setAttachment: (attrs?: unknown) => ReturnType;
470
+ twitter: {
471
+ /**
472
+ * Insert a tweet
473
+ * @param options The tweet attributes
474
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
475
+ */
476
+ setTweet: (options: SetTweetOptions) => ReturnType;
477
+ updateTweet: (options: SetTweetOptions) => ReturnType;
463
478
  };
464
479
  }
465
480
  }
@@ -487,24 +502,9 @@ declare module '@tiptap/core' {
487
502
 
488
503
  declare module '@tiptap/core' {
489
504
  interface Commands<ReturnType> {
490
- mermaid: {
491
- setMermaid: (options: any, replace?: any) => ReturnType;
492
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
493
- };
494
- }
495
- }
496
-
497
-
498
- declare module '@tiptap/core' {
499
- interface Commands<ReturnType> {
500
- twitter: {
501
- /**
502
- * Insert a tweet
503
- * @param options The tweet attributes
504
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
505
- */
506
- setTweet: (options: SetTweetOptions) => ReturnType;
507
- updateTweet: (options: SetTweetOptions) => ReturnType;
505
+ drawer: {
506
+ setDrawer: (options: any, replace?: any) => ReturnType;
507
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
508
508
  };
509
509
  }
510
510
  }
@@ -512,9 +512,9 @@ declare module '@tiptap/core' {
512
512
 
513
513
  declare module '@tiptap/core' {
514
514
  interface Commands<ReturnType> {
515
- drawer: {
516
- setDrawer: (options: any, replace?: any) => ReturnType;
517
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
515
+ mermaid: {
516
+ setMermaid: (options: any, replace?: any) => ReturnType;
517
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
518
518
  };
519
519
  }
520
520
  }
package/lib/index.d.ts CHANGED
@@ -324,6 +324,16 @@ declare module '@tiptap/core' {
324
324
  }
325
325
 
326
326
 
327
+ declare module '@tiptap/core' {
328
+ interface Commands<ReturnType> {
329
+ tableCellBackground: {
330
+ setTableCellBackground: (color: string) => ReturnType;
331
+ unsetTableCellBackground: () => ReturnType;
332
+ };
333
+ }
334
+ }
335
+
336
+
327
337
  declare module '@tiptap/core' {
328
338
  interface Commands<ReturnType> {
329
339
  imageUpload: {
@@ -344,15 +354,6 @@ declare module '@tiptap/core' {
344
354
  }
345
355
 
346
356
 
347
- declare module '@tiptap/core' {
348
- interface Commands<ReturnType> {
349
- painter: {
350
- setPainter: (marks: Mark[]) => ReturnType;
351
- };
352
- }
353
- }
354
-
355
-
356
357
  declare module '@tiptap/core' {
357
358
  interface Commands<ReturnType> {
358
359
  columns: {
@@ -369,14 +370,8 @@ declare module '@tiptap/core' {
369
370
 
370
371
  declare module '@tiptap/core' {
371
372
  interface Commands<ReturnType> {
372
- iframe: {
373
- /**
374
- * Add an iframe
375
- */
376
- setIframe: (options: {
377
- src: string;
378
- service: string;
379
- }) => ReturnType;
373
+ painter: {
374
+ setPainter: (marks: Mark[]) => ReturnType;
380
375
  };
381
376
  }
382
377
  }
@@ -384,9 +379,20 @@ declare module '@tiptap/core' {
384
379
 
385
380
  declare module '@tiptap/core' {
386
381
  interface Commands<ReturnType> {
387
- tableCellBackground: {
388
- setTableCellBackground: (color: string) => ReturnType;
389
- unsetTableCellBackground: () => ReturnType;
382
+ katex: {
383
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
384
+ };
385
+ }
386
+ }
387
+
388
+
389
+ declare module '@tiptap/core' {
390
+ interface Commands<ReturnType> {
391
+ emoji: {
392
+ setEmoji: (emoji: {
393
+ name: string;
394
+ emoji: string;
395
+ }) => ReturnType;
390
396
  };
391
397
  }
392
398
  }
@@ -409,8 +415,14 @@ declare module '@tiptap/core' {
409
415
 
410
416
  declare module '@tiptap/core' {
411
417
  interface Commands<ReturnType> {
412
- katex: {
413
- setKatex: (arg?: IKatexAttrs) => ReturnType;
418
+ iframe: {
419
+ /**
420
+ * Add an iframe
421
+ */
422
+ setIframe: (options: {
423
+ src: string;
424
+ service: string;
425
+ }) => ReturnType;
414
426
  };
415
427
  }
416
428
  }
@@ -418,11 +430,9 @@ declare module '@tiptap/core' {
418
430
 
419
431
  declare module '@tiptap/core' {
420
432
  interface Commands<ReturnType> {
421
- emoji: {
422
- setEmoji: (emoji: {
423
- name: string;
424
- emoji: string;
425
- }) => ReturnType;
433
+ tableOfContents: {
434
+ setTableOfContents: () => ReturnType;
435
+ removeTableOfContents: () => ReturnType;
426
436
  };
427
437
  }
428
438
  }
@@ -448,9 +458,8 @@ declare module '@tiptap/core' {
448
458
 
449
459
  declare module '@tiptap/core' {
450
460
  interface Commands<ReturnType> {
451
- tableOfContents: {
452
- setTableOfContents: () => ReturnType;
453
- removeTableOfContents: () => ReturnType;
461
+ attachment: {
462
+ setAttachment: (attrs?: unknown) => ReturnType;
454
463
  };
455
464
  }
456
465
  }
@@ -458,8 +467,14 @@ declare module '@tiptap/core' {
458
467
 
459
468
  declare module '@tiptap/core' {
460
469
  interface Commands<ReturnType> {
461
- attachment: {
462
- setAttachment: (attrs?: unknown) => ReturnType;
470
+ twitter: {
471
+ /**
472
+ * Insert a tweet
473
+ * @param options The tweet attributes
474
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
475
+ */
476
+ setTweet: (options: SetTweetOptions) => ReturnType;
477
+ updateTweet: (options: SetTweetOptions) => ReturnType;
463
478
  };
464
479
  }
465
480
  }
@@ -487,24 +502,9 @@ declare module '@tiptap/core' {
487
502
 
488
503
  declare module '@tiptap/core' {
489
504
  interface Commands<ReturnType> {
490
- mermaid: {
491
- setMermaid: (options: any, replace?: any) => ReturnType;
492
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
493
- };
494
- }
495
- }
496
-
497
-
498
- declare module '@tiptap/core' {
499
- interface Commands<ReturnType> {
500
- twitter: {
501
- /**
502
- * Insert a tweet
503
- * @param options The tweet attributes
504
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
505
- */
506
- setTweet: (options: SetTweetOptions) => ReturnType;
507
- updateTweet: (options: SetTweetOptions) => ReturnType;
505
+ drawer: {
506
+ setDrawer: (options: any, replace?: any) => ReturnType;
507
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
508
508
  };
509
509
  }
510
510
  }
@@ -512,9 +512,9 @@ declare module '@tiptap/core' {
512
512
 
513
513
  declare module '@tiptap/core' {
514
514
  interface Commands<ReturnType> {
515
- drawer: {
516
- setDrawer: (options: any, replace?: any) => ReturnType;
517
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
515
+ mermaid: {
516
+ setMermaid: (options: any, replace?: any) => ReturnType;
517
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
518
518
  };
519
519
  }
520
520
  }
@@ -953,6 +953,16 @@ declare module '@tiptap/core' {
953
953
  }
954
954
 
955
955
 
956
+ declare module '@tiptap/core' {
957
+ interface Commands<ReturnType> {
958
+ tableCellBackground: {
959
+ setTableCellBackground: (color: string) => ReturnType;
960
+ unsetTableCellBackground: () => ReturnType;
961
+ };
962
+ }
963
+ }
964
+
965
+
956
966
  declare module '@tiptap/core' {
957
967
  interface Commands<ReturnType> {
958
968
  imageUpload: {
@@ -973,15 +983,6 @@ declare module '@tiptap/core' {
973
983
  }
974
984
 
975
985
 
976
- declare module '@tiptap/core' {
977
- interface Commands<ReturnType> {
978
- painter: {
979
- setPainter: (marks: Mark[]) => ReturnType;
980
- };
981
- }
982
- }
983
-
984
-
985
986
  declare module '@tiptap/core' {
986
987
  interface Commands<ReturnType> {
987
988
  columns: {
@@ -998,14 +999,8 @@ declare module '@tiptap/core' {
998
999
 
999
1000
  declare module '@tiptap/core' {
1000
1001
  interface Commands<ReturnType> {
1001
- iframe: {
1002
- /**
1003
- * Add an iframe
1004
- */
1005
- setIframe: (options: {
1006
- src: string;
1007
- service: string;
1008
- }) => ReturnType;
1002
+ painter: {
1003
+ setPainter: (marks: Mark[]) => ReturnType;
1009
1004
  };
1010
1005
  }
1011
1006
  }
@@ -1013,9 +1008,20 @@ declare module '@tiptap/core' {
1013
1008
 
1014
1009
  declare module '@tiptap/core' {
1015
1010
  interface Commands<ReturnType> {
1016
- tableCellBackground: {
1017
- setTableCellBackground: (color: string) => ReturnType;
1018
- unsetTableCellBackground: () => ReturnType;
1011
+ katex: {
1012
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
1013
+ };
1014
+ }
1015
+ }
1016
+
1017
+
1018
+ declare module '@tiptap/core' {
1019
+ interface Commands<ReturnType> {
1020
+ emoji: {
1021
+ setEmoji: (emoji: {
1022
+ name: string;
1023
+ emoji: string;
1024
+ }) => ReturnType;
1019
1025
  };
1020
1026
  }
1021
1027
  }
@@ -1038,8 +1044,14 @@ declare module '@tiptap/core' {
1038
1044
 
1039
1045
  declare module '@tiptap/core' {
1040
1046
  interface Commands<ReturnType> {
1041
- katex: {
1042
- setKatex: (arg?: IKatexAttrs) => ReturnType;
1047
+ iframe: {
1048
+ /**
1049
+ * Add an iframe
1050
+ */
1051
+ setIframe: (options: {
1052
+ src: string;
1053
+ service: string;
1054
+ }) => ReturnType;
1043
1055
  };
1044
1056
  }
1045
1057
  }
@@ -1047,11 +1059,9 @@ declare module '@tiptap/core' {
1047
1059
 
1048
1060
  declare module '@tiptap/core' {
1049
1061
  interface Commands<ReturnType> {
1050
- emoji: {
1051
- setEmoji: (emoji: {
1052
- name: string;
1053
- emoji: string;
1054
- }) => ReturnType;
1062
+ tableOfContents: {
1063
+ setTableOfContents: () => ReturnType;
1064
+ removeTableOfContents: () => ReturnType;
1055
1065
  };
1056
1066
  }
1057
1067
  }
@@ -1077,9 +1087,8 @@ declare module '@tiptap/core' {
1077
1087
 
1078
1088
  declare module '@tiptap/core' {
1079
1089
  interface Commands<ReturnType> {
1080
- tableOfContents: {
1081
- setTableOfContents: () => ReturnType;
1082
- removeTableOfContents: () => ReturnType;
1090
+ attachment: {
1091
+ setAttachment: (attrs?: unknown) => ReturnType;
1083
1092
  };
1084
1093
  }
1085
1094
  }
@@ -1087,8 +1096,14 @@ declare module '@tiptap/core' {
1087
1096
 
1088
1097
  declare module '@tiptap/core' {
1089
1098
  interface Commands<ReturnType> {
1090
- attachment: {
1091
- setAttachment: (attrs?: unknown) => ReturnType;
1099
+ twitter: {
1100
+ /**
1101
+ * Insert a tweet
1102
+ * @param options The tweet attributes
1103
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1104
+ */
1105
+ setTweet: (options: SetTweetOptions) => ReturnType;
1106
+ updateTweet: (options: SetTweetOptions) => ReturnType;
1092
1107
  };
1093
1108
  }
1094
1109
  }
@@ -1116,24 +1131,9 @@ declare module '@tiptap/core' {
1116
1131
 
1117
1132
  declare module '@tiptap/core' {
1118
1133
  interface Commands<ReturnType> {
1119
- mermaid: {
1120
- setMermaid: (options: any, replace?: any) => ReturnType;
1121
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
1122
- };
1123
- }
1124
- }
1125
-
1126
-
1127
- declare module '@tiptap/core' {
1128
- interface Commands<ReturnType> {
1129
- twitter: {
1130
- /**
1131
- * Insert a tweet
1132
- * @param options The tweet attributes
1133
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1134
- */
1135
- setTweet: (options: SetTweetOptions) => ReturnType;
1136
- updateTweet: (options: SetTweetOptions) => ReturnType;
1134
+ drawer: {
1135
+ setDrawer: (options: any, replace?: any) => ReturnType;
1136
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
1137
1137
  };
1138
1138
  }
1139
1139
  }
@@ -1141,9 +1141,9 @@ declare module '@tiptap/core' {
1141
1141
 
1142
1142
  declare module '@tiptap/core' {
1143
1143
  interface Commands<ReturnType> {
1144
- drawer: {
1145
- setDrawer: (options: any, replace?: any) => ReturnType;
1146
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
1144
+ mermaid: {
1145
+ setMermaid: (options: any, replace?: any) => ReturnType;
1146
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
1147
1147
  };
1148
1148
  }
1149
1149
  }
@@ -953,6 +953,16 @@ declare module '@tiptap/core' {
953
953
  }
954
954
 
955
955
 
956
+ declare module '@tiptap/core' {
957
+ interface Commands<ReturnType> {
958
+ tableCellBackground: {
959
+ setTableCellBackground: (color: string) => ReturnType;
960
+ unsetTableCellBackground: () => ReturnType;
961
+ };
962
+ }
963
+ }
964
+
965
+
956
966
  declare module '@tiptap/core' {
957
967
  interface Commands<ReturnType> {
958
968
  imageUpload: {
@@ -973,15 +983,6 @@ declare module '@tiptap/core' {
973
983
  }
974
984
 
975
985
 
976
- declare module '@tiptap/core' {
977
- interface Commands<ReturnType> {
978
- painter: {
979
- setPainter: (marks: Mark[]) => ReturnType;
980
- };
981
- }
982
- }
983
-
984
-
985
986
  declare module '@tiptap/core' {
986
987
  interface Commands<ReturnType> {
987
988
  columns: {
@@ -998,14 +999,8 @@ declare module '@tiptap/core' {
998
999
 
999
1000
  declare module '@tiptap/core' {
1000
1001
  interface Commands<ReturnType> {
1001
- iframe: {
1002
- /**
1003
- * Add an iframe
1004
- */
1005
- setIframe: (options: {
1006
- src: string;
1007
- service: string;
1008
- }) => ReturnType;
1002
+ painter: {
1003
+ setPainter: (marks: Mark[]) => ReturnType;
1009
1004
  };
1010
1005
  }
1011
1006
  }
@@ -1013,9 +1008,20 @@ declare module '@tiptap/core' {
1013
1008
 
1014
1009
  declare module '@tiptap/core' {
1015
1010
  interface Commands<ReturnType> {
1016
- tableCellBackground: {
1017
- setTableCellBackground: (color: string) => ReturnType;
1018
- unsetTableCellBackground: () => ReturnType;
1011
+ katex: {
1012
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
1013
+ };
1014
+ }
1015
+ }
1016
+
1017
+
1018
+ declare module '@tiptap/core' {
1019
+ interface Commands<ReturnType> {
1020
+ emoji: {
1021
+ setEmoji: (emoji: {
1022
+ name: string;
1023
+ emoji: string;
1024
+ }) => ReturnType;
1019
1025
  };
1020
1026
  }
1021
1027
  }
@@ -1038,8 +1044,14 @@ declare module '@tiptap/core' {
1038
1044
 
1039
1045
  declare module '@tiptap/core' {
1040
1046
  interface Commands<ReturnType> {
1041
- katex: {
1042
- setKatex: (arg?: IKatexAttrs) => ReturnType;
1047
+ iframe: {
1048
+ /**
1049
+ * Add an iframe
1050
+ */
1051
+ setIframe: (options: {
1052
+ src: string;
1053
+ service: string;
1054
+ }) => ReturnType;
1043
1055
  };
1044
1056
  }
1045
1057
  }
@@ -1047,11 +1059,9 @@ declare module '@tiptap/core' {
1047
1059
 
1048
1060
  declare module '@tiptap/core' {
1049
1061
  interface Commands<ReturnType> {
1050
- emoji: {
1051
- setEmoji: (emoji: {
1052
- name: string;
1053
- emoji: string;
1054
- }) => ReturnType;
1062
+ tableOfContents: {
1063
+ setTableOfContents: () => ReturnType;
1064
+ removeTableOfContents: () => ReturnType;
1055
1065
  };
1056
1066
  }
1057
1067
  }
@@ -1077,9 +1087,8 @@ declare module '@tiptap/core' {
1077
1087
 
1078
1088
  declare module '@tiptap/core' {
1079
1089
  interface Commands<ReturnType> {
1080
- tableOfContents: {
1081
- setTableOfContents: () => ReturnType;
1082
- removeTableOfContents: () => ReturnType;
1090
+ attachment: {
1091
+ setAttachment: (attrs?: unknown) => ReturnType;
1083
1092
  };
1084
1093
  }
1085
1094
  }
@@ -1087,8 +1096,14 @@ declare module '@tiptap/core' {
1087
1096
 
1088
1097
  declare module '@tiptap/core' {
1089
1098
  interface Commands<ReturnType> {
1090
- attachment: {
1091
- setAttachment: (attrs?: unknown) => ReturnType;
1099
+ twitter: {
1100
+ /**
1101
+ * Insert a tweet
1102
+ * @param options The tweet attributes
1103
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1104
+ */
1105
+ setTweet: (options: SetTweetOptions) => ReturnType;
1106
+ updateTweet: (options: SetTweetOptions) => ReturnType;
1092
1107
  };
1093
1108
  }
1094
1109
  }
@@ -1116,24 +1131,9 @@ declare module '@tiptap/core' {
1116
1131
 
1117
1132
  declare module '@tiptap/core' {
1118
1133
  interface Commands<ReturnType> {
1119
- mermaid: {
1120
- setMermaid: (options: any, replace?: any) => ReturnType;
1121
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
1122
- };
1123
- }
1124
- }
1125
-
1126
-
1127
- declare module '@tiptap/core' {
1128
- interface Commands<ReturnType> {
1129
- twitter: {
1130
- /**
1131
- * Insert a tweet
1132
- * @param options The tweet attributes
1133
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1134
- */
1135
- setTweet: (options: SetTweetOptions) => ReturnType;
1136
- updateTweet: (options: SetTweetOptions) => ReturnType;
1134
+ drawer: {
1135
+ setDrawer: (options: any, replace?: any) => ReturnType;
1136
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
1137
1137
  };
1138
1138
  }
1139
1139
  }
@@ -1141,9 +1141,9 @@ declare module '@tiptap/core' {
1141
1141
 
1142
1142
  declare module '@tiptap/core' {
1143
1143
  interface Commands<ReturnType> {
1144
- drawer: {
1145
- setDrawer: (options: any, replace?: any) => ReturnType;
1146
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
1144
+ mermaid: {
1145
+ setMermaid: (options: any, replace?: any) => ReturnType;
1146
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
1147
1147
  };
1148
1148
  }
1149
1149
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "reactjs-tiptap-editor",
3
3
  "type": "module",
4
- "version": "0.2.26",
4
+ "version": "0.2.27",
5
5
  "packageManager": "pnpm@8.15.9",
6
6
  "description": "A modern WYSIWYG rich text editor based on tiptap and shadcn ui for React",
7
7
  "license": "MIT",
@@ -181,7 +181,7 @@
181
181
  "lodash-es": "^4.17.21",
182
182
  "lucide-react": "^0.427.0",
183
183
  "mermaid": "^11.6.0",
184
- "prism-code-editor-lightweight": "^0.0.2",
184
+ "prism-code-editor-lightweight": "^0.0.3",
185
185
  "prosemirror-docx": "^0.2.1",
186
186
  "re-resizable": "^6.11.2",
187
187
  "react-colorful": "^5.6.1",