reactjs-tiptap-editor-pro 0.2.27 → 0.2.29

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
@@ -37,6 +37,7 @@ declare interface BubbleMenuConfig {
37
37
  * custom menu actions
38
38
  */
39
39
  actions?: ActionButtonProps[];
40
+ items?: string[];
40
41
  }
41
42
 
42
43
  /**
@@ -71,6 +72,7 @@ declare interface BubbleMenuProps {
71
72
  * @default false
72
73
  */
73
74
  hidden?: boolean;
75
+ items?: string[];
74
76
  };
75
77
  imageConfig?: {
76
78
  /**
@@ -291,9 +293,8 @@ declare module '@tiptap/core' {
291
293
 
292
294
  declare module '@tiptap/core' {
293
295
  interface Commands<ReturnType> {
294
- lineHeight: {
295
- setLineHeight: (lineHeight: string) => ReturnType;
296
- unsetLineHeight: () => ReturnType;
296
+ painter: {
297
+ setPainter: (marks: Mark[]) => ReturnType;
297
298
  };
298
299
  }
299
300
  }
@@ -301,8 +302,15 @@ declare module '@tiptap/core' {
301
302
 
302
303
  declare module '@tiptap/core' {
303
304
  interface Commands<ReturnType> {
304
- katex: {
305
- setKatex: (arg?: IKatexAttrs) => ReturnType;
305
+ indent: {
306
+ /**
307
+ * Set the indent attribute
308
+ */
309
+ indent: () => ReturnType;
310
+ /**
311
+ * Set the outdent attribute
312
+ */
313
+ outdent: () => ReturnType;
306
314
  };
307
315
  }
308
316
  }
@@ -310,14 +318,19 @@ declare module '@tiptap/core' {
310
318
 
311
319
  declare module '@tiptap/core' {
312
320
  interface Commands<ReturnType> {
313
- iframe: {
321
+ imageUpload: {
314
322
  /**
315
- * Add an iframe
323
+ * Add an image
316
324
  */
317
- setIframe: (options: {
318
- src: string;
319
- service: string;
320
- }) => ReturnType;
325
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
326
+ /**
327
+ * Update an image
328
+ */
329
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
330
+ /**
331
+ * Set image alignment
332
+ */
333
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
321
334
  };
322
335
  }
323
336
  }
@@ -325,11 +338,13 @@ declare module '@tiptap/core' {
325
338
 
326
339
  declare module '@tiptap/core' {
327
340
  interface Commands<ReturnType> {
328
- emoji: {
329
- setEmoji: (emoji: {
330
- name: string;
331
- emoji: string;
341
+ columns: {
342
+ insertColumns: (attrs?: {
343
+ cols: number;
332
344
  }) => ReturnType;
345
+ addColBefore: () => ReturnType;
346
+ addColAfter: () => ReturnType;
347
+ deleteCol: () => ReturnType;
333
348
  };
334
349
  }
335
350
  }
@@ -337,8 +352,9 @@ declare module '@tiptap/core' {
337
352
 
338
353
  declare module '@tiptap/core' {
339
354
  interface Commands<ReturnType> {
340
- painter: {
341
- setPainter: (marks: Mark[]) => ReturnType;
355
+ lineHeight: {
356
+ setLineHeight: (lineHeight: string) => ReturnType;
357
+ unsetLineHeight: () => ReturnType;
342
358
  };
343
359
  }
344
360
  }
@@ -346,8 +362,9 @@ declare module '@tiptap/core' {
346
362
 
347
363
  declare module '@tiptap/core' {
348
364
  interface Commands<ReturnType> {
349
- exportWord: {
350
- exportToWord: () => ReturnType;
365
+ tableCellBackground: {
366
+ setTableCellBackground: (color: string) => ReturnType;
367
+ unsetTableCellBackground: () => ReturnType;
351
368
  };
352
369
  }
353
370
  }
@@ -355,19 +372,14 @@ declare module '@tiptap/core' {
355
372
 
356
373
  declare module '@tiptap/core' {
357
374
  interface Commands<ReturnType> {
358
- imageUpload: {
359
- /**
360
- * Add an image
361
- */
362
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
363
- /**
364
- * Update an image
365
- */
366
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
375
+ iframe: {
367
376
  /**
368
- * Set image alignment
377
+ * Add an iframe
369
378
  */
370
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
379
+ setIframe: (options: {
380
+ src: string;
381
+ service: string;
382
+ }) => ReturnType;
371
383
  };
372
384
  }
373
385
  }
@@ -390,9 +402,9 @@ declare module '@tiptap/core' {
390
402
 
391
403
  declare module '@tiptap/core' {
392
404
  interface Commands<ReturnType> {
393
- tableCellBackground: {
394
- setTableCellBackground: (color: string) => ReturnType;
395
- unsetTableCellBackground: () => ReturnType;
405
+ tableOfContents: {
406
+ setTableOfContents: () => ReturnType;
407
+ removeTableOfContents: () => ReturnType;
396
408
  };
397
409
  }
398
410
  }
@@ -400,15 +412,11 @@ declare module '@tiptap/core' {
400
412
 
401
413
  declare module '@tiptap/core' {
402
414
  interface Commands<ReturnType> {
403
- indent: {
404
- /**
405
- * Set the indent attribute
406
- */
407
- indent: () => ReturnType;
408
- /**
409
- * Set the outdent attribute
410
- */
411
- outdent: () => ReturnType;
415
+ emoji: {
416
+ setEmoji: (emoji: {
417
+ name: string;
418
+ emoji: string;
419
+ }) => ReturnType;
412
420
  };
413
421
  }
414
422
  }
@@ -416,13 +424,8 @@ declare module '@tiptap/core' {
416
424
 
417
425
  declare module '@tiptap/core' {
418
426
  interface Commands<ReturnType> {
419
- columns: {
420
- insertColumns: (attrs?: {
421
- cols: number;
422
- }) => ReturnType;
423
- addColBefore: () => ReturnType;
424
- addColAfter: () => ReturnType;
425
- deleteCol: () => ReturnType;
427
+ exportWord: {
428
+ exportToWord: () => ReturnType;
426
429
  };
427
430
  }
428
431
  }
@@ -439,9 +442,8 @@ declare module '@tiptap/core' {
439
442
 
440
443
  declare module '@tiptap/core' {
441
444
  interface Commands<ReturnType> {
442
- tableOfContents: {
443
- setTableOfContents: () => ReturnType;
444
- removeTableOfContents: () => ReturnType;
445
+ katex: {
446
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
445
447
  };
446
448
  }
447
449
  }
@@ -449,19 +451,9 @@ declare module '@tiptap/core' {
449
451
 
450
452
  declare module '@tiptap/core' {
451
453
  interface Commands<ReturnType> {
452
- imageGifUpload: {
453
- /**
454
- * Add an image gif
455
- */
456
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
457
- /**
458
- * Update an image gif
459
- */
460
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
461
- /**
462
- * Set image alignment
463
- */
464
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
454
+ mermaid: {
455
+ setMermaid: (options: any, replace?: any) => ReturnType;
456
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
465
457
  };
466
458
  }
467
459
  }
@@ -469,14 +461,8 @@ declare module '@tiptap/core' {
469
461
 
470
462
  declare module '@tiptap/core' {
471
463
  interface Commands<ReturnType> {
472
- twitter: {
473
- /**
474
- * Insert a tweet
475
- * @param options The tweet attributes
476
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
477
- */
478
- setTweet: (options: SetTweetOptions) => ReturnType;
479
- updateTweet: (options: SetTweetOptions) => ReturnType;
464
+ attachment: {
465
+ setAttachment: (attrs?: unknown) => ReturnType;
480
466
  };
481
467
  }
482
468
  }
@@ -494,9 +480,14 @@ declare module '@tiptap/core' {
494
480
 
495
481
  declare module '@tiptap/core' {
496
482
  interface Commands<ReturnType> {
497
- mermaid: {
498
- setMermaid: (options: any, replace?: any) => ReturnType;
499
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
483
+ twitter: {
484
+ /**
485
+ * Insert a tweet
486
+ * @param options The tweet attributes
487
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
488
+ */
489
+ setTweet: (options: SetTweetOptions) => ReturnType;
490
+ updateTweet: (options: SetTweetOptions) => ReturnType;
500
491
  };
501
492
  }
502
493
  }
@@ -504,8 +495,19 @@ declare module '@tiptap/core' {
504
495
 
505
496
  declare module '@tiptap/core' {
506
497
  interface Commands<ReturnType> {
507
- attachment: {
508
- setAttachment: (attrs?: unknown) => ReturnType;
498
+ imageGifUpload: {
499
+ /**
500
+ * Add an image gif
501
+ */
502
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
503
+ /**
504
+ * Update an image gif
505
+ */
506
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
507
+ /**
508
+ * Set image alignment
509
+ */
510
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
509
511
  };
510
512
  }
511
513
  }
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { useRef as d, useState as o, useEffect as f } from "react";
2
- import { R as m } from "./RichTextEditor-B1Y3PPzy.js";
2
+ import { R as m } from "./RichTextEditor-iGJ6-rbq.js";
3
3
  import { B as x } from "./tiptap-DkWHMWDt.js";
4
4
  function c() {
5
5
  var t;
@@ -920,9 +920,8 @@ declare module '@tiptap/core' {
920
920
 
921
921
  declare module '@tiptap/core' {
922
922
  interface Commands<ReturnType> {
923
- lineHeight: {
924
- setLineHeight: (lineHeight: string) => ReturnType;
925
- unsetLineHeight: () => ReturnType;
923
+ painter: {
924
+ setPainter: (marks: Mark[]) => ReturnType;
926
925
  };
927
926
  }
928
927
  }
@@ -930,8 +929,15 @@ declare module '@tiptap/core' {
930
929
 
931
930
  declare module '@tiptap/core' {
932
931
  interface Commands<ReturnType> {
933
- katex: {
934
- setKatex: (arg?: IKatexAttrs) => ReturnType;
932
+ indent: {
933
+ /**
934
+ * Set the indent attribute
935
+ */
936
+ indent: () => ReturnType;
937
+ /**
938
+ * Set the outdent attribute
939
+ */
940
+ outdent: () => ReturnType;
935
941
  };
936
942
  }
937
943
  }
@@ -939,14 +945,19 @@ declare module '@tiptap/core' {
939
945
 
940
946
  declare module '@tiptap/core' {
941
947
  interface Commands<ReturnType> {
942
- iframe: {
948
+ imageUpload: {
943
949
  /**
944
- * Add an iframe
950
+ * Add an image
945
951
  */
946
- setIframe: (options: {
947
- src: string;
948
- service: string;
949
- }) => ReturnType;
952
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
953
+ /**
954
+ * Update an image
955
+ */
956
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
957
+ /**
958
+ * Set image alignment
959
+ */
960
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
950
961
  };
951
962
  }
952
963
  }
@@ -954,11 +965,13 @@ declare module '@tiptap/core' {
954
965
 
955
966
  declare module '@tiptap/core' {
956
967
  interface Commands<ReturnType> {
957
- emoji: {
958
- setEmoji: (emoji: {
959
- name: string;
960
- emoji: string;
968
+ columns: {
969
+ insertColumns: (attrs?: {
970
+ cols: number;
961
971
  }) => ReturnType;
972
+ addColBefore: () => ReturnType;
973
+ addColAfter: () => ReturnType;
974
+ deleteCol: () => ReturnType;
962
975
  };
963
976
  }
964
977
  }
@@ -966,8 +979,9 @@ declare module '@tiptap/core' {
966
979
 
967
980
  declare module '@tiptap/core' {
968
981
  interface Commands<ReturnType> {
969
- painter: {
970
- setPainter: (marks: Mark[]) => ReturnType;
982
+ lineHeight: {
983
+ setLineHeight: (lineHeight: string) => ReturnType;
984
+ unsetLineHeight: () => ReturnType;
971
985
  };
972
986
  }
973
987
  }
@@ -975,8 +989,9 @@ declare module '@tiptap/core' {
975
989
 
976
990
  declare module '@tiptap/core' {
977
991
  interface Commands<ReturnType> {
978
- exportWord: {
979
- exportToWord: () => ReturnType;
992
+ tableCellBackground: {
993
+ setTableCellBackground: (color: string) => ReturnType;
994
+ unsetTableCellBackground: () => ReturnType;
980
995
  };
981
996
  }
982
997
  }
@@ -984,19 +999,14 @@ declare module '@tiptap/core' {
984
999
 
985
1000
  declare module '@tiptap/core' {
986
1001
  interface Commands<ReturnType> {
987
- imageUpload: {
988
- /**
989
- * Add an image
990
- */
991
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
992
- /**
993
- * Update an image
994
- */
995
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1002
+ iframe: {
996
1003
  /**
997
- * Set image alignment
1004
+ * Add an iframe
998
1005
  */
999
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
1006
+ setIframe: (options: {
1007
+ src: string;
1008
+ service: string;
1009
+ }) => ReturnType;
1000
1010
  };
1001
1011
  }
1002
1012
  }
@@ -1019,9 +1029,9 @@ declare module '@tiptap/core' {
1019
1029
 
1020
1030
  declare module '@tiptap/core' {
1021
1031
  interface Commands<ReturnType> {
1022
- tableCellBackground: {
1023
- setTableCellBackground: (color: string) => ReturnType;
1024
- unsetTableCellBackground: () => ReturnType;
1032
+ tableOfContents: {
1033
+ setTableOfContents: () => ReturnType;
1034
+ removeTableOfContents: () => ReturnType;
1025
1035
  };
1026
1036
  }
1027
1037
  }
@@ -1029,15 +1039,11 @@ declare module '@tiptap/core' {
1029
1039
 
1030
1040
  declare module '@tiptap/core' {
1031
1041
  interface Commands<ReturnType> {
1032
- indent: {
1033
- /**
1034
- * Set the indent attribute
1035
- */
1036
- indent: () => ReturnType;
1037
- /**
1038
- * Set the outdent attribute
1039
- */
1040
- outdent: () => ReturnType;
1042
+ emoji: {
1043
+ setEmoji: (emoji: {
1044
+ name: string;
1045
+ emoji: string;
1046
+ }) => ReturnType;
1041
1047
  };
1042
1048
  }
1043
1049
  }
@@ -1045,13 +1051,8 @@ declare module '@tiptap/core' {
1045
1051
 
1046
1052
  declare module '@tiptap/core' {
1047
1053
  interface Commands<ReturnType> {
1048
- columns: {
1049
- insertColumns: (attrs?: {
1050
- cols: number;
1051
- }) => ReturnType;
1052
- addColBefore: () => ReturnType;
1053
- addColAfter: () => ReturnType;
1054
- deleteCol: () => ReturnType;
1054
+ exportWord: {
1055
+ exportToWord: () => ReturnType;
1055
1056
  };
1056
1057
  }
1057
1058
  }
@@ -1068,9 +1069,8 @@ declare module '@tiptap/core' {
1068
1069
 
1069
1070
  declare module '@tiptap/core' {
1070
1071
  interface Commands<ReturnType> {
1071
- tableOfContents: {
1072
- setTableOfContents: () => ReturnType;
1073
- removeTableOfContents: () => ReturnType;
1072
+ katex: {
1073
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
1074
1074
  };
1075
1075
  }
1076
1076
  }
@@ -1078,19 +1078,9 @@ declare module '@tiptap/core' {
1078
1078
 
1079
1079
  declare module '@tiptap/core' {
1080
1080
  interface Commands<ReturnType> {
1081
- imageGifUpload: {
1082
- /**
1083
- * Add an image gif
1084
- */
1085
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1086
- /**
1087
- * Update an image gif
1088
- */
1089
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1090
- /**
1091
- * Set image alignment
1092
- */
1093
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
1081
+ mermaid: {
1082
+ setMermaid: (options: any, replace?: any) => ReturnType;
1083
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
1094
1084
  };
1095
1085
  }
1096
1086
  }
@@ -1098,14 +1088,8 @@ declare module '@tiptap/core' {
1098
1088
 
1099
1089
  declare module '@tiptap/core' {
1100
1090
  interface Commands<ReturnType> {
1101
- twitter: {
1102
- /**
1103
- * Insert a tweet
1104
- * @param options The tweet attributes
1105
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1106
- */
1107
- setTweet: (options: SetTweetOptions) => ReturnType;
1108
- updateTweet: (options: SetTweetOptions) => ReturnType;
1091
+ attachment: {
1092
+ setAttachment: (attrs?: unknown) => ReturnType;
1109
1093
  };
1110
1094
  }
1111
1095
  }
@@ -1123,9 +1107,14 @@ declare module '@tiptap/core' {
1123
1107
 
1124
1108
  declare module '@tiptap/core' {
1125
1109
  interface Commands<ReturnType> {
1126
- mermaid: {
1127
- setMermaid: (options: any, replace?: any) => ReturnType;
1128
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
1110
+ twitter: {
1111
+ /**
1112
+ * Insert a tweet
1113
+ * @param options The tweet attributes
1114
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1115
+ */
1116
+ setTweet: (options: SetTweetOptions) => ReturnType;
1117
+ updateTweet: (options: SetTweetOptions) => ReturnType;
1129
1118
  };
1130
1119
  }
1131
1120
  }
@@ -1133,8 +1122,19 @@ declare module '@tiptap/core' {
1133
1122
 
1134
1123
  declare module '@tiptap/core' {
1135
1124
  interface Commands<ReturnType> {
1136
- attachment: {
1137
- setAttachment: (attrs?: unknown) => ReturnType;
1125
+ imageGifUpload: {
1126
+ /**
1127
+ * Add an image gif
1128
+ */
1129
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1130
+ /**
1131
+ * Update an image gif
1132
+ */
1133
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1134
+ /**
1135
+ * Set image alignment
1136
+ */
1137
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
1138
1138
  };
1139
1139
  }
1140
1140
  }