reactjs-tiptap-editor 0.2.12 → 0.2.13

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
@@ -249,36 +249,6 @@ declare module '@tiptap/core' {
249
249
  }
250
250
 
251
251
 
252
- declare module '@tiptap/core' {
253
- interface Commands<ReturnType> {
254
- lineHeight: {
255
- setLineHeight: (lineHeight: string) => ReturnType;
256
- unsetLineHeight: () => ReturnType;
257
- };
258
- }
259
- }
260
-
261
-
262
- declare module '@tiptap/core' {
263
- interface Commands<ReturnType> {
264
- imageUpload: {
265
- /**
266
- * Add an image
267
- */
268
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
269
- /**
270
- * Update an image
271
- */
272
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
273
- /**
274
- * Set image alignment
275
- */
276
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
277
- };
278
- }
279
- }
280
-
281
-
282
252
  declare module '@tiptap/core' {
283
253
  interface Commands<ReturnType> {
284
254
  indent: {
@@ -297,11 +267,9 @@ declare module '@tiptap/core' {
297
267
 
298
268
  declare module '@tiptap/core' {
299
269
  interface Commands<ReturnType> {
300
- emoji: {
301
- setEmoji: (emoji: {
302
- name: string;
303
- emoji: string;
304
- }) => ReturnType;
270
+ lineHeight: {
271
+ setLineHeight: (lineHeight: string) => ReturnType;
272
+ unsetLineHeight: () => ReturnType;
305
273
  };
306
274
  }
307
275
  }
@@ -321,6 +289,16 @@ declare module '@tiptap/core' {
321
289
  }
322
290
 
323
291
 
292
+ declare module '@tiptap/core' {
293
+ interface Commands<ReturnType> {
294
+ tableCellBackground: {
295
+ setTableCellBackground: (color: string) => ReturnType;
296
+ unsetTableCellBackground: () => ReturnType;
297
+ };
298
+ }
299
+ }
300
+
301
+
324
302
  declare module '@tiptap/core' {
325
303
  interface Commands<ReturnType> {
326
304
  iframe: {
@@ -336,6 +314,26 @@ declare module '@tiptap/core' {
336
314
  }
337
315
 
338
316
 
317
+ declare module '@tiptap/core' {
318
+ interface Commands<ReturnType> {
319
+ imageUpload: {
320
+ /**
321
+ * Add an image
322
+ */
323
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
324
+ /**
325
+ * Update an image
326
+ */
327
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
328
+ /**
329
+ * Set image alignment
330
+ */
331
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
332
+ };
333
+ }
334
+ }
335
+
336
+
339
337
  declare module '@tiptap/core' {
340
338
  interface Commands<ReturnType> {
341
339
  painter: {
@@ -371,9 +369,8 @@ declare module '@tiptap/core' {
371
369
 
372
370
  declare module '@tiptap/core' {
373
371
  interface Commands<ReturnType> {
374
- tableCellBackground: {
375
- setTableCellBackground: (color: string) => ReturnType;
376
- unsetTableCellBackground: () => ReturnType;
372
+ exportWord: {
373
+ exportToWord: () => ReturnType;
377
374
  };
378
375
  }
379
376
  }
@@ -381,8 +378,9 @@ declare module '@tiptap/core' {
381
378
 
382
379
  declare module '@tiptap/core' {
383
380
  interface Commands<ReturnType> {
384
- exportWord: {
385
- exportToWord: () => ReturnType;
381
+ tableOfContents: {
382
+ setTableOfContents: () => ReturnType;
383
+ removeTableOfContents: () => ReturnType;
386
384
  };
387
385
  }
388
386
  }
@@ -390,8 +388,11 @@ declare module '@tiptap/core' {
390
388
 
391
389
  declare module '@tiptap/core' {
392
390
  interface Commands<ReturnType> {
393
- excalidraw: {
394
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
391
+ emoji: {
392
+ setEmoji: (emoji: {
393
+ name: string;
394
+ emoji: string;
395
+ }) => ReturnType;
395
396
  };
396
397
  }
397
398
  }
@@ -399,9 +400,23 @@ declare module '@tiptap/core' {
399
400
 
400
401
  declare module '@tiptap/core' {
401
402
  interface Commands<ReturnType> {
402
- tableOfContents: {
403
- setTableOfContents: () => ReturnType;
404
- removeTableOfContents: () => ReturnType;
403
+ twitter: {
404
+ /**
405
+ * Insert a tweet
406
+ * @param options The tweet attributes
407
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
408
+ */
409
+ setTweet: (options: SetTweetOptions) => ReturnType;
410
+ updateTweet: (options: SetTweetOptions) => ReturnType;
411
+ };
412
+ }
413
+ }
414
+
415
+
416
+ declare module '@tiptap/core' {
417
+ interface Commands<ReturnType> {
418
+ attachment: {
419
+ setAttachment: (attrs?: unknown) => ReturnType;
405
420
  };
406
421
  }
407
422
  }
@@ -439,18 +454,8 @@ declare module '@tiptap/core' {
439
454
 
440
455
  declare module '@tiptap/core' {
441
456
  interface Commands<ReturnType> {
442
- mermaid: {
443
- setMermaid: (options: any, replace?: any) => ReturnType;
444
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
445
- };
446
- }
447
- }
448
-
449
-
450
- declare module '@tiptap/core' {
451
- interface Commands<ReturnType> {
452
- attachment: {
453
- setAttachment: (attrs?: unknown) => ReturnType;
457
+ excalidraw: {
458
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
454
459
  };
455
460
  }
456
461
  }
@@ -458,14 +463,9 @@ declare module '@tiptap/core' {
458
463
 
459
464
  declare module '@tiptap/core' {
460
465
  interface Commands<ReturnType> {
461
- twitter: {
462
- /**
463
- * Insert a tweet
464
- * @param options The tweet attributes
465
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
466
- */
467
- setTweet: (options: SetTweetOptions) => ReturnType;
468
- updateTweet: (options: SetTweetOptions) => ReturnType;
466
+ mermaid: {
467
+ setMermaid: (options: any, replace?: any) => ReturnType;
468
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
469
469
  };
470
470
  }
471
471
  }
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-CIenLXbH.js";
3
- import { B as x } from "./tiptap-DKUVyykT.js";
2
+ import { R as m } from "./RichTextEditor-DqXFuGeI.js";
3
+ import { B as x } from "./tiptap-24JNJPT1.js";
4
4
  function c() {
5
5
  var t;
6
6
  const e = d({ editor: null }), [u, s] = o(!1), [i, n] = o(null);
@@ -918,36 +918,6 @@ declare module '@tiptap/core' {
918
918
  }
919
919
 
920
920
 
921
- declare module '@tiptap/core' {
922
- interface Commands<ReturnType> {
923
- lineHeight: {
924
- setLineHeight: (lineHeight: string) => ReturnType;
925
- unsetLineHeight: () => ReturnType;
926
- };
927
- }
928
- }
929
-
930
-
931
- declare module '@tiptap/core' {
932
- interface Commands<ReturnType> {
933
- imageUpload: {
934
- /**
935
- * Add an image
936
- */
937
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
938
- /**
939
- * Update an image
940
- */
941
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
942
- /**
943
- * Set image alignment
944
- */
945
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
946
- };
947
- }
948
- }
949
-
950
-
951
921
  declare module '@tiptap/core' {
952
922
  interface Commands<ReturnType> {
953
923
  indent: {
@@ -966,11 +936,9 @@ declare module '@tiptap/core' {
966
936
 
967
937
  declare module '@tiptap/core' {
968
938
  interface Commands<ReturnType> {
969
- emoji: {
970
- setEmoji: (emoji: {
971
- name: string;
972
- emoji: string;
973
- }) => ReturnType;
939
+ lineHeight: {
940
+ setLineHeight: (lineHeight: string) => ReturnType;
941
+ unsetLineHeight: () => ReturnType;
974
942
  };
975
943
  }
976
944
  }
@@ -990,6 +958,16 @@ declare module '@tiptap/core' {
990
958
  }
991
959
 
992
960
 
961
+ declare module '@tiptap/core' {
962
+ interface Commands<ReturnType> {
963
+ tableCellBackground: {
964
+ setTableCellBackground: (color: string) => ReturnType;
965
+ unsetTableCellBackground: () => ReturnType;
966
+ };
967
+ }
968
+ }
969
+
970
+
993
971
  declare module '@tiptap/core' {
994
972
  interface Commands<ReturnType> {
995
973
  iframe: {
@@ -1005,6 +983,26 @@ declare module '@tiptap/core' {
1005
983
  }
1006
984
 
1007
985
 
986
+ declare module '@tiptap/core' {
987
+ interface Commands<ReturnType> {
988
+ imageUpload: {
989
+ /**
990
+ * Add an image
991
+ */
992
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
993
+ /**
994
+ * Update an image
995
+ */
996
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
997
+ /**
998
+ * Set image alignment
999
+ */
1000
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
1001
+ };
1002
+ }
1003
+ }
1004
+
1005
+
1008
1006
  declare module '@tiptap/core' {
1009
1007
  interface Commands<ReturnType> {
1010
1008
  painter: {
@@ -1040,9 +1038,8 @@ declare module '@tiptap/core' {
1040
1038
 
1041
1039
  declare module '@tiptap/core' {
1042
1040
  interface Commands<ReturnType> {
1043
- tableCellBackground: {
1044
- setTableCellBackground: (color: string) => ReturnType;
1045
- unsetTableCellBackground: () => ReturnType;
1041
+ exportWord: {
1042
+ exportToWord: () => ReturnType;
1046
1043
  };
1047
1044
  }
1048
1045
  }
@@ -1050,8 +1047,9 @@ declare module '@tiptap/core' {
1050
1047
 
1051
1048
  declare module '@tiptap/core' {
1052
1049
  interface Commands<ReturnType> {
1053
- exportWord: {
1054
- exportToWord: () => ReturnType;
1050
+ tableOfContents: {
1051
+ setTableOfContents: () => ReturnType;
1052
+ removeTableOfContents: () => ReturnType;
1055
1053
  };
1056
1054
  }
1057
1055
  }
@@ -1059,8 +1057,11 @@ declare module '@tiptap/core' {
1059
1057
 
1060
1058
  declare module '@tiptap/core' {
1061
1059
  interface Commands<ReturnType> {
1062
- excalidraw: {
1063
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1060
+ emoji: {
1061
+ setEmoji: (emoji: {
1062
+ name: string;
1063
+ emoji: string;
1064
+ }) => ReturnType;
1064
1065
  };
1065
1066
  }
1066
1067
  }
@@ -1068,9 +1069,23 @@ 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
+ twitter: {
1073
+ /**
1074
+ * Insert a tweet
1075
+ * @param options The tweet attributes
1076
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1077
+ */
1078
+ setTweet: (options: SetTweetOptions) => ReturnType;
1079
+ updateTweet: (options: SetTweetOptions) => ReturnType;
1080
+ };
1081
+ }
1082
+ }
1083
+
1084
+
1085
+ declare module '@tiptap/core' {
1086
+ interface Commands<ReturnType> {
1087
+ attachment: {
1088
+ setAttachment: (attrs?: unknown) => ReturnType;
1074
1089
  };
1075
1090
  }
1076
1091
  }
@@ -1108,18 +1123,8 @@ declare module '@tiptap/core' {
1108
1123
 
1109
1124
  declare module '@tiptap/core' {
1110
1125
  interface Commands<ReturnType> {
1111
- mermaid: {
1112
- setMermaid: (options: any, replace?: any) => ReturnType;
1113
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
1114
- };
1115
- }
1116
- }
1117
-
1118
-
1119
- declare module '@tiptap/core' {
1120
- interface Commands<ReturnType> {
1121
- attachment: {
1122
- setAttachment: (attrs?: unknown) => ReturnType;
1126
+ excalidraw: {
1127
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1123
1128
  };
1124
1129
  }
1125
1130
  }
@@ -1127,14 +1132,9 @@ declare module '@tiptap/core' {
1127
1132
 
1128
1133
  declare module '@tiptap/core' {
1129
1134
  interface Commands<ReturnType> {
1130
- twitter: {
1131
- /**
1132
- * Insert a tweet
1133
- * @param options The tweet attributes
1134
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1135
- */
1136
- setTweet: (options: SetTweetOptions) => ReturnType;
1137
- updateTweet: (options: SetTweetOptions) => ReturnType;
1135
+ mermaid: {
1136
+ setMermaid: (options: any, replace?: any) => ReturnType;
1137
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
1138
1138
  };
1139
1139
  }
1140
1140
  }
@@ -918,36 +918,6 @@ declare module '@tiptap/core' {
918
918
  }
919
919
 
920
920
 
921
- declare module '@tiptap/core' {
922
- interface Commands<ReturnType> {
923
- lineHeight: {
924
- setLineHeight: (lineHeight: string) => ReturnType;
925
- unsetLineHeight: () => ReturnType;
926
- };
927
- }
928
- }
929
-
930
-
931
- declare module '@tiptap/core' {
932
- interface Commands<ReturnType> {
933
- imageUpload: {
934
- /**
935
- * Add an image
936
- */
937
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
938
- /**
939
- * Update an image
940
- */
941
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
942
- /**
943
- * Set image alignment
944
- */
945
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
946
- };
947
- }
948
- }
949
-
950
-
951
921
  declare module '@tiptap/core' {
952
922
  interface Commands<ReturnType> {
953
923
  indent: {
@@ -966,11 +936,9 @@ declare module '@tiptap/core' {
966
936
 
967
937
  declare module '@tiptap/core' {
968
938
  interface Commands<ReturnType> {
969
- emoji: {
970
- setEmoji: (emoji: {
971
- name: string;
972
- emoji: string;
973
- }) => ReturnType;
939
+ lineHeight: {
940
+ setLineHeight: (lineHeight: string) => ReturnType;
941
+ unsetLineHeight: () => ReturnType;
974
942
  };
975
943
  }
976
944
  }
@@ -990,6 +958,16 @@ declare module '@tiptap/core' {
990
958
  }
991
959
 
992
960
 
961
+ declare module '@tiptap/core' {
962
+ interface Commands<ReturnType> {
963
+ tableCellBackground: {
964
+ setTableCellBackground: (color: string) => ReturnType;
965
+ unsetTableCellBackground: () => ReturnType;
966
+ };
967
+ }
968
+ }
969
+
970
+
993
971
  declare module '@tiptap/core' {
994
972
  interface Commands<ReturnType> {
995
973
  iframe: {
@@ -1005,6 +983,26 @@ declare module '@tiptap/core' {
1005
983
  }
1006
984
 
1007
985
 
986
+ declare module '@tiptap/core' {
987
+ interface Commands<ReturnType> {
988
+ imageUpload: {
989
+ /**
990
+ * Add an image
991
+ */
992
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
993
+ /**
994
+ * Update an image
995
+ */
996
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
997
+ /**
998
+ * Set image alignment
999
+ */
1000
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
1001
+ };
1002
+ }
1003
+ }
1004
+
1005
+
1008
1006
  declare module '@tiptap/core' {
1009
1007
  interface Commands<ReturnType> {
1010
1008
  painter: {
@@ -1040,9 +1038,8 @@ declare module '@tiptap/core' {
1040
1038
 
1041
1039
  declare module '@tiptap/core' {
1042
1040
  interface Commands<ReturnType> {
1043
- tableCellBackground: {
1044
- setTableCellBackground: (color: string) => ReturnType;
1045
- unsetTableCellBackground: () => ReturnType;
1041
+ exportWord: {
1042
+ exportToWord: () => ReturnType;
1046
1043
  };
1047
1044
  }
1048
1045
  }
@@ -1050,8 +1047,9 @@ declare module '@tiptap/core' {
1050
1047
 
1051
1048
  declare module '@tiptap/core' {
1052
1049
  interface Commands<ReturnType> {
1053
- exportWord: {
1054
- exportToWord: () => ReturnType;
1050
+ tableOfContents: {
1051
+ setTableOfContents: () => ReturnType;
1052
+ removeTableOfContents: () => ReturnType;
1055
1053
  };
1056
1054
  }
1057
1055
  }
@@ -1059,8 +1057,11 @@ declare module '@tiptap/core' {
1059
1057
 
1060
1058
  declare module '@tiptap/core' {
1061
1059
  interface Commands<ReturnType> {
1062
- excalidraw: {
1063
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1060
+ emoji: {
1061
+ setEmoji: (emoji: {
1062
+ name: string;
1063
+ emoji: string;
1064
+ }) => ReturnType;
1064
1065
  };
1065
1066
  }
1066
1067
  }
@@ -1068,9 +1069,23 @@ 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
+ twitter: {
1073
+ /**
1074
+ * Insert a tweet
1075
+ * @param options The tweet attributes
1076
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1077
+ */
1078
+ setTweet: (options: SetTweetOptions) => ReturnType;
1079
+ updateTweet: (options: SetTweetOptions) => ReturnType;
1080
+ };
1081
+ }
1082
+ }
1083
+
1084
+
1085
+ declare module '@tiptap/core' {
1086
+ interface Commands<ReturnType> {
1087
+ attachment: {
1088
+ setAttachment: (attrs?: unknown) => ReturnType;
1074
1089
  };
1075
1090
  }
1076
1091
  }
@@ -1108,18 +1123,8 @@ declare module '@tiptap/core' {
1108
1123
 
1109
1124
  declare module '@tiptap/core' {
1110
1125
  interface Commands<ReturnType> {
1111
- mermaid: {
1112
- setMermaid: (options: any, replace?: any) => ReturnType;
1113
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
1114
- };
1115
- }
1116
- }
1117
-
1118
-
1119
- declare module '@tiptap/core' {
1120
- interface Commands<ReturnType> {
1121
- attachment: {
1122
- setAttachment: (attrs?: unknown) => ReturnType;
1126
+ excalidraw: {
1127
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1123
1128
  };
1124
1129
  }
1125
1130
  }
@@ -1127,14 +1132,9 @@ declare module '@tiptap/core' {
1127
1132
 
1128
1133
  declare module '@tiptap/core' {
1129
1134
  interface Commands<ReturnType> {
1130
- twitter: {
1131
- /**
1132
- * Insert a tweet
1133
- * @param options The tweet attributes
1134
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1135
- */
1136
- setTweet: (options: SetTweetOptions) => ReturnType;
1137
- updateTweet: (options: SetTweetOptions) => ReturnType;
1135
+ mermaid: {
1136
+ setMermaid: (options: any, replace?: any) => ReturnType;
1137
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
1138
1138
  };
1139
1139
  }
1140
1140
  }