reactjs-tiptap-editor-pro 0.2.22 → 0.2.24

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
@@ -291,13 +291,19 @@ declare module '@tiptap/core' {
291
291
 
292
292
  declare module '@tiptap/core' {
293
293
  interface Commands<ReturnType> {
294
- columns: {
295
- insertColumns: (attrs?: {
296
- cols: number;
297
- }) => ReturnType;
298
- addColBefore: () => ReturnType;
299
- addColAfter: () => ReturnType;
300
- deleteCol: () => ReturnType;
294
+ imageUpload: {
295
+ /**
296
+ * Add an image
297
+ */
298
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
299
+ /**
300
+ * Update an image
301
+ */
302
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
303
+ /**
304
+ * Set image alignment
305
+ */
306
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
301
307
  };
302
308
  }
303
309
  }
@@ -305,8 +311,14 @@ declare module '@tiptap/core' {
305
311
 
306
312
  declare module '@tiptap/core' {
307
313
  interface Commands<ReturnType> {
308
- painter: {
309
- setPainter: (marks: Mark[]) => ReturnType;
314
+ iframe: {
315
+ /**
316
+ * Add an iframe
317
+ */
318
+ setIframe: (options: {
319
+ src: string;
320
+ service: string;
321
+ }) => ReturnType;
310
322
  };
311
323
  }
312
324
  }
@@ -314,9 +326,14 @@ declare module '@tiptap/core' {
314
326
 
315
327
  declare module '@tiptap/core' {
316
328
  interface Commands<ReturnType> {
317
- lineHeight: {
318
- setLineHeight: (lineHeight: string) => ReturnType;
319
- unsetLineHeight: () => ReturnType;
329
+ search: {
330
+ setSearchTerm: (searchTerm: string) => ReturnType;
331
+ setReplaceTerm: (replaceTerm: string) => ReturnType;
332
+ replace: () => ReturnType;
333
+ replaceAll: () => ReturnType;
334
+ goToPrevSearchResult: () => void;
335
+ goToNextSearchResult: () => void;
336
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
320
337
  };
321
338
  }
322
339
  }
@@ -324,15 +341,8 @@ declare module '@tiptap/core' {
324
341
 
325
342
  declare module '@tiptap/core' {
326
343
  interface Commands<ReturnType> {
327
- indent: {
328
- /**
329
- * Set the indent attribute
330
- */
331
- indent: () => ReturnType;
332
- /**
333
- * Set the outdent attribute
334
- */
335
- outdent: () => ReturnType;
344
+ painter: {
345
+ setPainter: (marks: Mark[]) => ReturnType;
336
346
  };
337
347
  }
338
348
  }
@@ -340,19 +350,9 @@ declare module '@tiptap/core' {
340
350
 
341
351
  declare module '@tiptap/core' {
342
352
  interface Commands<ReturnType> {
343
- imageUpload: {
344
- /**
345
- * Add an image
346
- */
347
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
348
- /**
349
- * Update an image
350
- */
351
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
352
- /**
353
- * Set image alignment
354
- */
355
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
353
+ tableCellBackground: {
354
+ setTableCellBackground: (color: string) => ReturnType;
355
+ unsetTableCellBackground: () => ReturnType;
356
356
  };
357
357
  }
358
358
  }
@@ -360,9 +360,15 @@ declare module '@tiptap/core' {
360
360
 
361
361
  declare module '@tiptap/core' {
362
362
  interface Commands<ReturnType> {
363
- tableCellBackground: {
364
- setTableCellBackground: (color: string) => ReturnType;
365
- unsetTableCellBackground: () => ReturnType;
363
+ indent: {
364
+ /**
365
+ * Set the indent attribute
366
+ */
367
+ indent: () => ReturnType;
368
+ /**
369
+ * Set the outdent attribute
370
+ */
371
+ outdent: () => ReturnType;
366
372
  };
367
373
  }
368
374
  }
@@ -370,8 +376,11 @@ declare module '@tiptap/core' {
370
376
 
371
377
  declare module '@tiptap/core' {
372
378
  interface Commands<ReturnType> {
373
- katex: {
374
- setKatex: (arg?: IKatexAttrs) => ReturnType;
379
+ emoji: {
380
+ setEmoji: (emoji: {
381
+ name: string;
382
+ emoji: string;
383
+ }) => ReturnType;
375
384
  };
376
385
  }
377
386
  }
@@ -379,9 +388,13 @@ declare module '@tiptap/core' {
379
388
 
380
389
  declare module '@tiptap/core' {
381
390
  interface Commands<ReturnType> {
382
- tableOfContents: {
383
- setTableOfContents: () => ReturnType;
384
- removeTableOfContents: () => ReturnType;
391
+ columns: {
392
+ insertColumns: (attrs?: {
393
+ cols: number;
394
+ }) => ReturnType;
395
+ addColBefore: () => ReturnType;
396
+ addColAfter: () => ReturnType;
397
+ deleteCol: () => ReturnType;
385
398
  };
386
399
  }
387
400
  }
@@ -389,8 +402,9 @@ declare module '@tiptap/core' {
389
402
 
390
403
  declare module '@tiptap/core' {
391
404
  interface Commands<ReturnType> {
392
- excalidraw: {
393
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
405
+ lineHeight: {
406
+ setLineHeight: (lineHeight: string) => ReturnType;
407
+ unsetLineHeight: () => ReturnType;
394
408
  };
395
409
  }
396
410
  }
@@ -398,11 +412,8 @@ declare module '@tiptap/core' {
398
412
 
399
413
  declare module '@tiptap/core' {
400
414
  interface Commands<ReturnType> {
401
- emoji: {
402
- setEmoji: (emoji: {
403
- name: string;
404
- emoji: string;
405
- }) => ReturnType;
415
+ katex: {
416
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
406
417
  };
407
418
  }
408
419
  }
@@ -410,14 +421,14 @@ declare module '@tiptap/core' {
410
421
 
411
422
  declare module '@tiptap/core' {
412
423
  interface Commands<ReturnType> {
413
- iframe: {
424
+ twitter: {
414
425
  /**
415
- * Add an iframe
426
+ * Insert a tweet
427
+ * @param options The tweet attributes
428
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
416
429
  */
417
- setIframe: (options: {
418
- src: string;
419
- service: string;
420
- }) => ReturnType;
430
+ setTweet: (options: SetTweetOptions) => ReturnType;
431
+ updateTweet: (options: SetTweetOptions) => ReturnType;
421
432
  };
422
433
  }
423
434
  }
@@ -434,14 +445,9 @@ declare module '@tiptap/core' {
434
445
 
435
446
  declare module '@tiptap/core' {
436
447
  interface Commands<ReturnType> {
437
- search: {
438
- setSearchTerm: (searchTerm: string) => ReturnType;
439
- setReplaceTerm: (replaceTerm: string) => ReturnType;
440
- replace: () => ReturnType;
441
- replaceAll: () => ReturnType;
442
- goToPrevSearchResult: () => void;
443
- goToNextSearchResult: () => void;
444
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
448
+ mermaid: {
449
+ setMermaid: (options: any, replace?: any) => ReturnType;
450
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
445
451
  };
446
452
  }
447
453
  }
@@ -469,9 +475,8 @@ declare module '@tiptap/core' {
469
475
 
470
476
  declare module '@tiptap/core' {
471
477
  interface Commands<ReturnType> {
472
- mermaid: {
473
- setMermaid: (options: any, replace?: any) => ReturnType;
474
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
478
+ attachment: {
479
+ setAttachment: (attrs?: unknown) => ReturnType;
475
480
  };
476
481
  }
477
482
  }
@@ -479,8 +484,9 @@ declare module '@tiptap/core' {
479
484
 
480
485
  declare module '@tiptap/core' {
481
486
  interface Commands<ReturnType> {
482
- attachment: {
483
- setAttachment: (attrs?: unknown) => ReturnType;
487
+ tableOfContents: {
488
+ setTableOfContents: () => ReturnType;
489
+ removeTableOfContents: () => ReturnType;
484
490
  };
485
491
  }
486
492
  }
@@ -488,14 +494,9 @@ declare module '@tiptap/core' {
488
494
 
489
495
  declare module '@tiptap/core' {
490
496
  interface Commands<ReturnType> {
491
- twitter: {
492
- /**
493
- * Insert a tweet
494
- * @param options The tweet attributes
495
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
496
- */
497
- setTweet: (options: SetTweetOptions) => ReturnType;
498
- updateTweet: (options: SetTweetOptions) => ReturnType;
497
+ drawer: {
498
+ setDrawer: (options: any, replace?: any) => ReturnType;
499
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
499
500
  };
500
501
  }
501
502
  }
@@ -503,9 +504,8 @@ declare module '@tiptap/core' {
503
504
 
504
505
  declare module '@tiptap/core' {
505
506
  interface Commands<ReturnType> {
506
- drawer: {
507
- setDrawer: (options: any, replace?: any) => ReturnType;
508
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
507
+ excalidraw: {
508
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
509
509
  };
510
510
  }
511
511
  }
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { useRef as d, useState as o, useEffect as f } from "react";
2
- import { R as m } from "./RichTextEditor-BnruDETn.js";
3
- import { B as x } from "./tiptap-BV9BUpUC.js";
2
+ import { R as m } from "./RichTextEditor-Bxdp3pW3.js";
3
+ import { B as x } from "./tiptap-Kst3Ray3.js";
4
4
  function c() {
5
5
  var t;
6
6
  const e = d({ editor: null }), [u, s] = o(!1), [i, n] = o(null);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CYg22iLG.cjs");exports.en=e.locale$1;exports.hu_HU=e.locale$2;exports.locale=e.locale;exports.pt_BR=e.locale$5;exports.vi=e.locale$3;exports.zh_CN=e.locale$4;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-D-rys8BA.cjs");exports.en=e.locale$1;exports.hu_HU=e.locale$2;exports.locale=e.locale;exports.pt_BR=e.locale$5;exports.vi=e.locale$3;exports.zh_CN=e.locale$4;
@@ -920,13 +920,19 @@ declare module '@tiptap/core' {
920
920
 
921
921
  declare module '@tiptap/core' {
922
922
  interface Commands<ReturnType> {
923
- columns: {
924
- insertColumns: (attrs?: {
925
- cols: number;
926
- }) => ReturnType;
927
- addColBefore: () => ReturnType;
928
- addColAfter: () => ReturnType;
929
- deleteCol: () => ReturnType;
923
+ imageUpload: {
924
+ /**
925
+ * Add an image
926
+ */
927
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
928
+ /**
929
+ * Update an image
930
+ */
931
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
932
+ /**
933
+ * Set image alignment
934
+ */
935
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
930
936
  };
931
937
  }
932
938
  }
@@ -934,8 +940,14 @@ declare module '@tiptap/core' {
934
940
 
935
941
  declare module '@tiptap/core' {
936
942
  interface Commands<ReturnType> {
937
- painter: {
938
- setPainter: (marks: Mark[]) => ReturnType;
943
+ iframe: {
944
+ /**
945
+ * Add an iframe
946
+ */
947
+ setIframe: (options: {
948
+ src: string;
949
+ service: string;
950
+ }) => ReturnType;
939
951
  };
940
952
  }
941
953
  }
@@ -943,9 +955,14 @@ declare module '@tiptap/core' {
943
955
 
944
956
  declare module '@tiptap/core' {
945
957
  interface Commands<ReturnType> {
946
- lineHeight: {
947
- setLineHeight: (lineHeight: string) => ReturnType;
948
- unsetLineHeight: () => ReturnType;
958
+ search: {
959
+ setSearchTerm: (searchTerm: string) => ReturnType;
960
+ setReplaceTerm: (replaceTerm: string) => ReturnType;
961
+ replace: () => ReturnType;
962
+ replaceAll: () => ReturnType;
963
+ goToPrevSearchResult: () => void;
964
+ goToNextSearchResult: () => void;
965
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
949
966
  };
950
967
  }
951
968
  }
@@ -953,15 +970,8 @@ declare module '@tiptap/core' {
953
970
 
954
971
  declare module '@tiptap/core' {
955
972
  interface Commands<ReturnType> {
956
- indent: {
957
- /**
958
- * Set the indent attribute
959
- */
960
- indent: () => ReturnType;
961
- /**
962
- * Set the outdent attribute
963
- */
964
- outdent: () => ReturnType;
973
+ painter: {
974
+ setPainter: (marks: Mark[]) => ReturnType;
965
975
  };
966
976
  }
967
977
  }
@@ -969,19 +979,9 @@ declare module '@tiptap/core' {
969
979
 
970
980
  declare module '@tiptap/core' {
971
981
  interface Commands<ReturnType> {
972
- imageUpload: {
973
- /**
974
- * Add an image
975
- */
976
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
977
- /**
978
- * Update an image
979
- */
980
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
981
- /**
982
- * Set image alignment
983
- */
984
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
982
+ tableCellBackground: {
983
+ setTableCellBackground: (color: string) => ReturnType;
984
+ unsetTableCellBackground: () => ReturnType;
985
985
  };
986
986
  }
987
987
  }
@@ -989,9 +989,15 @@ declare module '@tiptap/core' {
989
989
 
990
990
  declare module '@tiptap/core' {
991
991
  interface Commands<ReturnType> {
992
- tableCellBackground: {
993
- setTableCellBackground: (color: string) => ReturnType;
994
- unsetTableCellBackground: () => ReturnType;
992
+ indent: {
993
+ /**
994
+ * Set the indent attribute
995
+ */
996
+ indent: () => ReturnType;
997
+ /**
998
+ * Set the outdent attribute
999
+ */
1000
+ outdent: () => ReturnType;
995
1001
  };
996
1002
  }
997
1003
  }
@@ -999,8 +1005,11 @@ declare module '@tiptap/core' {
999
1005
 
1000
1006
  declare module '@tiptap/core' {
1001
1007
  interface Commands<ReturnType> {
1002
- katex: {
1003
- setKatex: (arg?: IKatexAttrs) => ReturnType;
1008
+ emoji: {
1009
+ setEmoji: (emoji: {
1010
+ name: string;
1011
+ emoji: string;
1012
+ }) => ReturnType;
1004
1013
  };
1005
1014
  }
1006
1015
  }
@@ -1008,9 +1017,13 @@ declare module '@tiptap/core' {
1008
1017
 
1009
1018
  declare module '@tiptap/core' {
1010
1019
  interface Commands<ReturnType> {
1011
- tableOfContents: {
1012
- setTableOfContents: () => ReturnType;
1013
- removeTableOfContents: () => ReturnType;
1020
+ columns: {
1021
+ insertColumns: (attrs?: {
1022
+ cols: number;
1023
+ }) => ReturnType;
1024
+ addColBefore: () => ReturnType;
1025
+ addColAfter: () => ReturnType;
1026
+ deleteCol: () => ReturnType;
1014
1027
  };
1015
1028
  }
1016
1029
  }
@@ -1018,8 +1031,9 @@ declare module '@tiptap/core' {
1018
1031
 
1019
1032
  declare module '@tiptap/core' {
1020
1033
  interface Commands<ReturnType> {
1021
- excalidraw: {
1022
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1034
+ lineHeight: {
1035
+ setLineHeight: (lineHeight: string) => ReturnType;
1036
+ unsetLineHeight: () => ReturnType;
1023
1037
  };
1024
1038
  }
1025
1039
  }
@@ -1027,11 +1041,8 @@ declare module '@tiptap/core' {
1027
1041
 
1028
1042
  declare module '@tiptap/core' {
1029
1043
  interface Commands<ReturnType> {
1030
- emoji: {
1031
- setEmoji: (emoji: {
1032
- name: string;
1033
- emoji: string;
1034
- }) => ReturnType;
1044
+ katex: {
1045
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
1035
1046
  };
1036
1047
  }
1037
1048
  }
@@ -1039,14 +1050,14 @@ declare module '@tiptap/core' {
1039
1050
 
1040
1051
  declare module '@tiptap/core' {
1041
1052
  interface Commands<ReturnType> {
1042
- iframe: {
1053
+ twitter: {
1043
1054
  /**
1044
- * Add an iframe
1055
+ * Insert a tweet
1056
+ * @param options The tweet attributes
1057
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1045
1058
  */
1046
- setIframe: (options: {
1047
- src: string;
1048
- service: string;
1049
- }) => ReturnType;
1059
+ setTweet: (options: SetTweetOptions) => ReturnType;
1060
+ updateTweet: (options: SetTweetOptions) => ReturnType;
1050
1061
  };
1051
1062
  }
1052
1063
  }
@@ -1063,14 +1074,9 @@ declare module '@tiptap/core' {
1063
1074
 
1064
1075
  declare module '@tiptap/core' {
1065
1076
  interface Commands<ReturnType> {
1066
- search: {
1067
- setSearchTerm: (searchTerm: string) => ReturnType;
1068
- setReplaceTerm: (replaceTerm: string) => ReturnType;
1069
- replace: () => ReturnType;
1070
- replaceAll: () => ReturnType;
1071
- goToPrevSearchResult: () => void;
1072
- goToNextSearchResult: () => void;
1073
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
1077
+ mermaid: {
1078
+ setMermaid: (options: any, replace?: any) => ReturnType;
1079
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
1074
1080
  };
1075
1081
  }
1076
1082
  }
@@ -1098,9 +1104,8 @@ declare module '@tiptap/core' {
1098
1104
 
1099
1105
  declare module '@tiptap/core' {
1100
1106
  interface Commands<ReturnType> {
1101
- mermaid: {
1102
- setMermaid: (options: any, replace?: any) => ReturnType;
1103
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
1107
+ attachment: {
1108
+ setAttachment: (attrs?: unknown) => ReturnType;
1104
1109
  };
1105
1110
  }
1106
1111
  }
@@ -1108,8 +1113,9 @@ declare module '@tiptap/core' {
1108
1113
 
1109
1114
  declare module '@tiptap/core' {
1110
1115
  interface Commands<ReturnType> {
1111
- attachment: {
1112
- setAttachment: (attrs?: unknown) => ReturnType;
1116
+ tableOfContents: {
1117
+ setTableOfContents: () => ReturnType;
1118
+ removeTableOfContents: () => ReturnType;
1113
1119
  };
1114
1120
  }
1115
1121
  }
@@ -1117,14 +1123,9 @@ declare module '@tiptap/core' {
1117
1123
 
1118
1124
  declare module '@tiptap/core' {
1119
1125
  interface Commands<ReturnType> {
1120
- twitter: {
1121
- /**
1122
- * Insert a tweet
1123
- * @param options The tweet attributes
1124
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1125
- */
1126
- setTweet: (options: SetTweetOptions) => ReturnType;
1127
- updateTweet: (options: SetTweetOptions) => ReturnType;
1126
+ drawer: {
1127
+ setDrawer: (options: any, replace?: any) => ReturnType;
1128
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
1128
1129
  };
1129
1130
  }
1130
1131
  }
@@ -1132,9 +1133,8 @@ declare module '@tiptap/core' {
1132
1133
 
1133
1134
  declare module '@tiptap/core' {
1134
1135
  interface Commands<ReturnType> {
1135
- drawer: {
1136
- setDrawer: (options: any, replace?: any) => ReturnType;
1137
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
1136
+ excalidraw: {
1137
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1138
1138
  };
1139
1139
  }
1140
1140
  }