reactjs-tiptap-editor 0.2.7 → 0.2.9

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
@@ -277,13 +277,9 @@ declare module '@tiptap/core' {
277
277
 
278
278
  declare module '@tiptap/core' {
279
279
  interface Commands<ReturnType> {
280
- columns: {
281
- insertColumns: (attrs?: {
282
- cols: number;
283
- }) => ReturnType;
284
- addColBefore: () => ReturnType;
285
- addColAfter: () => ReturnType;
286
- deleteCol: () => ReturnType;
280
+ tableCellBackground: {
281
+ setTableCellBackground: (color: string) => ReturnType;
282
+ unsetTableCellBackground: () => ReturnType;
287
283
  };
288
284
  }
289
285
  }
@@ -291,14 +287,19 @@ declare module '@tiptap/core' {
291
287
 
292
288
  declare module '@tiptap/core' {
293
289
  interface Commands<ReturnType> {
294
- iframe: {
290
+ imageUpload: {
295
291
  /**
296
- * Add an iframe
292
+ * Add an image
297
293
  */
298
- setIframe: (options: {
299
- src: string;
300
- service: string;
301
- }) => ReturnType;
294
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
295
+ /**
296
+ * Update an image
297
+ */
298
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
299
+ /**
300
+ * Set image alignment
301
+ */
302
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
302
303
  };
303
304
  }
304
305
  }
@@ -306,14 +307,8 @@ declare module '@tiptap/core' {
306
307
 
307
308
  declare module '@tiptap/core' {
308
309
  interface Commands<ReturnType> {
309
- search: {
310
- setSearchTerm: (searchTerm: string) => ReturnType;
311
- setReplaceTerm: (replaceTerm: string) => ReturnType;
312
- replace: () => ReturnType;
313
- replaceAll: () => ReturnType;
314
- goToPrevSearchResult: () => void;
315
- goToNextSearchResult: () => void;
316
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
310
+ katex: {
311
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
317
312
  };
318
313
  }
319
314
  }
@@ -321,9 +316,14 @@ declare module '@tiptap/core' {
321
316
 
322
317
  declare module '@tiptap/core' {
323
318
  interface Commands<ReturnType> {
324
- tableCellBackground: {
325
- setTableCellBackground: (color: string) => ReturnType;
326
- unsetTableCellBackground: () => ReturnType;
319
+ iframe: {
320
+ /**
321
+ * Add an iframe
322
+ */
323
+ setIframe: (options: {
324
+ src: string;
325
+ service: string;
326
+ }) => ReturnType;
327
327
  };
328
328
  }
329
329
  }
@@ -331,11 +331,8 @@ declare module '@tiptap/core' {
331
331
 
332
332
  declare module '@tiptap/core' {
333
333
  interface Commands<ReturnType> {
334
- emoji: {
335
- setEmoji: (emoji: {
336
- name: string;
337
- emoji: string;
338
- }) => ReturnType;
334
+ painter: {
335
+ setPainter: (marks: Mark[]) => ReturnType;
339
336
  };
340
337
  }
341
338
  }
@@ -343,19 +340,14 @@ declare module '@tiptap/core' {
343
340
 
344
341
  declare module '@tiptap/core' {
345
342
  interface Commands<ReturnType> {
346
- imageUpload: {
347
- /**
348
- * Add an image
349
- */
350
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
351
- /**
352
- * Update an image
353
- */
354
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
355
- /**
356
- * Set image alignment
357
- */
358
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
343
+ search: {
344
+ setSearchTerm: (searchTerm: string) => ReturnType;
345
+ setReplaceTerm: (replaceTerm: string) => ReturnType;
346
+ replace: () => ReturnType;
347
+ replaceAll: () => ReturnType;
348
+ goToPrevSearchResult: () => void;
349
+ goToNextSearchResult: () => void;
350
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
359
351
  };
360
352
  }
361
353
  }
@@ -363,8 +355,13 @@ declare module '@tiptap/core' {
363
355
 
364
356
  declare module '@tiptap/core' {
365
357
  interface Commands<ReturnType> {
366
- painter: {
367
- setPainter: (marks: Mark[]) => ReturnType;
358
+ columns: {
359
+ insertColumns: (attrs?: {
360
+ cols: number;
361
+ }) => ReturnType;
362
+ addColBefore: () => ReturnType;
363
+ addColAfter: () => ReturnType;
364
+ deleteCol: () => ReturnType;
368
365
  };
369
366
  }
370
367
  }
@@ -372,8 +369,11 @@ declare module '@tiptap/core' {
372
369
 
373
370
  declare module '@tiptap/core' {
374
371
  interface Commands<ReturnType> {
375
- katex: {
376
- setKatex: (arg?: IKatexAttrs) => ReturnType;
372
+ emoji: {
373
+ setEmoji: (emoji: {
374
+ name: string;
375
+ emoji: string;
376
+ }) => ReturnType;
377
377
  };
378
378
  }
379
379
  }
@@ -407,6 +407,16 @@ declare module '@tiptap/core' {
407
407
  }
408
408
 
409
409
 
410
+ declare module '@tiptap/core' {
411
+ interface Commands<ReturnType> {
412
+ mermaid: {
413
+ setMermaid: (options: any, replace?: any) => ReturnType;
414
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
415
+ };
416
+ }
417
+ }
418
+
419
+
410
420
  declare module '@tiptap/core' {
411
421
  interface Commands<ReturnType> {
412
422
  imageGifUpload: {
@@ -427,25 +437,6 @@ declare module '@tiptap/core' {
427
437
  }
428
438
 
429
439
 
430
- declare module '@tiptap/core' {
431
- interface Commands<ReturnType> {
432
- mermaid: {
433
- setMermaid: (options: any, replace?: any) => ReturnType;
434
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
435
- };
436
- }
437
- }
438
-
439
-
440
- declare module '@tiptap/core' {
441
- interface Commands<ReturnType> {
442
- attachment: {
443
- setAttachment: (attrs?: unknown) => ReturnType;
444
- };
445
- }
446
- }
447
-
448
-
449
440
  declare module '@tiptap/core' {
450
441
  interface Commands<ReturnType> {
451
442
  twitter: {
@@ -469,3 +460,12 @@ declare module '@tiptap/core' {
469
460
  };
470
461
  }
471
462
  }
463
+
464
+
465
+ declare module '@tiptap/core' {
466
+ interface Commands<ReturnType> {
467
+ attachment: {
468
+ setAttachment: (attrs?: unknown) => ReturnType;
469
+ };
470
+ }
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-GO6yxkq9.js";
3
- import { B as x } from "./tiptap-ahYjwjH-.js";
2
+ import { R as m } from "./RichTextEditor-DwHrESsL.js";
3
+ import { B as x } from "./tiptap-DKUVyykT.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-C7UbZ2CS.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-Bekz0zC7.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;
@@ -946,13 +946,9 @@ declare module '@tiptap/core' {
946
946
 
947
947
  declare module '@tiptap/core' {
948
948
  interface Commands<ReturnType> {
949
- columns: {
950
- insertColumns: (attrs?: {
951
- cols: number;
952
- }) => ReturnType;
953
- addColBefore: () => ReturnType;
954
- addColAfter: () => ReturnType;
955
- deleteCol: () => ReturnType;
949
+ tableCellBackground: {
950
+ setTableCellBackground: (color: string) => ReturnType;
951
+ unsetTableCellBackground: () => ReturnType;
956
952
  };
957
953
  }
958
954
  }
@@ -960,14 +956,19 @@ declare module '@tiptap/core' {
960
956
 
961
957
  declare module '@tiptap/core' {
962
958
  interface Commands<ReturnType> {
963
- iframe: {
959
+ imageUpload: {
964
960
  /**
965
- * Add an iframe
961
+ * Add an image
966
962
  */
967
- setIframe: (options: {
968
- src: string;
969
- service: string;
970
- }) => ReturnType;
963
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
964
+ /**
965
+ * Update an image
966
+ */
967
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
968
+ /**
969
+ * Set image alignment
970
+ */
971
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
971
972
  };
972
973
  }
973
974
  }
@@ -975,14 +976,8 @@ declare module '@tiptap/core' {
975
976
 
976
977
  declare module '@tiptap/core' {
977
978
  interface Commands<ReturnType> {
978
- search: {
979
- setSearchTerm: (searchTerm: string) => ReturnType;
980
- setReplaceTerm: (replaceTerm: string) => ReturnType;
981
- replace: () => ReturnType;
982
- replaceAll: () => ReturnType;
983
- goToPrevSearchResult: () => void;
984
- goToNextSearchResult: () => void;
985
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
979
+ katex: {
980
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
986
981
  };
987
982
  }
988
983
  }
@@ -990,9 +985,14 @@ declare module '@tiptap/core' {
990
985
 
991
986
  declare module '@tiptap/core' {
992
987
  interface Commands<ReturnType> {
993
- tableCellBackground: {
994
- setTableCellBackground: (color: string) => ReturnType;
995
- unsetTableCellBackground: () => ReturnType;
988
+ iframe: {
989
+ /**
990
+ * Add an iframe
991
+ */
992
+ setIframe: (options: {
993
+ src: string;
994
+ service: string;
995
+ }) => ReturnType;
996
996
  };
997
997
  }
998
998
  }
@@ -1000,11 +1000,8 @@ declare module '@tiptap/core' {
1000
1000
 
1001
1001
  declare module '@tiptap/core' {
1002
1002
  interface Commands<ReturnType> {
1003
- emoji: {
1004
- setEmoji: (emoji: {
1005
- name: string;
1006
- emoji: string;
1007
- }) => ReturnType;
1003
+ painter: {
1004
+ setPainter: (marks: Mark[]) => ReturnType;
1008
1005
  };
1009
1006
  }
1010
1007
  }
@@ -1012,19 +1009,14 @@ declare module '@tiptap/core' {
1012
1009
 
1013
1010
  declare module '@tiptap/core' {
1014
1011
  interface Commands<ReturnType> {
1015
- imageUpload: {
1016
- /**
1017
- * Add an image
1018
- */
1019
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1020
- /**
1021
- * Update an image
1022
- */
1023
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1024
- /**
1025
- * Set image alignment
1026
- */
1027
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
1012
+ search: {
1013
+ setSearchTerm: (searchTerm: string) => ReturnType;
1014
+ setReplaceTerm: (replaceTerm: string) => ReturnType;
1015
+ replace: () => ReturnType;
1016
+ replaceAll: () => ReturnType;
1017
+ goToPrevSearchResult: () => void;
1018
+ goToNextSearchResult: () => void;
1019
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
1028
1020
  };
1029
1021
  }
1030
1022
  }
@@ -1032,8 +1024,13 @@ declare module '@tiptap/core' {
1032
1024
 
1033
1025
  declare module '@tiptap/core' {
1034
1026
  interface Commands<ReturnType> {
1035
- painter: {
1036
- setPainter: (marks: Mark[]) => ReturnType;
1027
+ columns: {
1028
+ insertColumns: (attrs?: {
1029
+ cols: number;
1030
+ }) => ReturnType;
1031
+ addColBefore: () => ReturnType;
1032
+ addColAfter: () => ReturnType;
1033
+ deleteCol: () => ReturnType;
1037
1034
  };
1038
1035
  }
1039
1036
  }
@@ -1041,8 +1038,11 @@ declare module '@tiptap/core' {
1041
1038
 
1042
1039
  declare module '@tiptap/core' {
1043
1040
  interface Commands<ReturnType> {
1044
- katex: {
1045
- setKatex: (arg?: IKatexAttrs) => ReturnType;
1041
+ emoji: {
1042
+ setEmoji: (emoji: {
1043
+ name: string;
1044
+ emoji: string;
1045
+ }) => ReturnType;
1046
1046
  };
1047
1047
  }
1048
1048
  }
@@ -1076,6 +1076,16 @@ declare module '@tiptap/core' {
1076
1076
  }
1077
1077
 
1078
1078
 
1079
+ declare module '@tiptap/core' {
1080
+ interface Commands<ReturnType> {
1081
+ mermaid: {
1082
+ setMermaid: (options: any, replace?: any) => ReturnType;
1083
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
1084
+ };
1085
+ }
1086
+ }
1087
+
1088
+
1079
1089
  declare module '@tiptap/core' {
1080
1090
  interface Commands<ReturnType> {
1081
1091
  imageGifUpload: {
@@ -1096,25 +1106,6 @@ declare module '@tiptap/core' {
1096
1106
  }
1097
1107
 
1098
1108
 
1099
- declare module '@tiptap/core' {
1100
- interface Commands<ReturnType> {
1101
- mermaid: {
1102
- setMermaid: (options: any, replace?: any) => ReturnType;
1103
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
1104
- };
1105
- }
1106
- }
1107
-
1108
-
1109
- declare module '@tiptap/core' {
1110
- interface Commands<ReturnType> {
1111
- attachment: {
1112
- setAttachment: (attrs?: unknown) => ReturnType;
1113
- };
1114
- }
1115
- }
1116
-
1117
-
1118
1109
  declare module '@tiptap/core' {
1119
1110
  interface Commands<ReturnType> {
1120
1111
  twitter: {
@@ -1138,3 +1129,12 @@ declare module '@tiptap/core' {
1138
1129
  };
1139
1130
  }
1140
1131
  }
1132
+
1133
+
1134
+ declare module '@tiptap/core' {
1135
+ interface Commands<ReturnType> {
1136
+ attachment: {
1137
+ setAttachment: (attrs?: unknown) => ReturnType;
1138
+ };
1139
+ }
1140
+ }
@@ -946,13 +946,9 @@ declare module '@tiptap/core' {
946
946
 
947
947
  declare module '@tiptap/core' {
948
948
  interface Commands<ReturnType> {
949
- columns: {
950
- insertColumns: (attrs?: {
951
- cols: number;
952
- }) => ReturnType;
953
- addColBefore: () => ReturnType;
954
- addColAfter: () => ReturnType;
955
- deleteCol: () => ReturnType;
949
+ tableCellBackground: {
950
+ setTableCellBackground: (color: string) => ReturnType;
951
+ unsetTableCellBackground: () => ReturnType;
956
952
  };
957
953
  }
958
954
  }
@@ -960,14 +956,19 @@ declare module '@tiptap/core' {
960
956
 
961
957
  declare module '@tiptap/core' {
962
958
  interface Commands<ReturnType> {
963
- iframe: {
959
+ imageUpload: {
964
960
  /**
965
- * Add an iframe
961
+ * Add an image
966
962
  */
967
- setIframe: (options: {
968
- src: string;
969
- service: string;
970
- }) => ReturnType;
963
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
964
+ /**
965
+ * Update an image
966
+ */
967
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
968
+ /**
969
+ * Set image alignment
970
+ */
971
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
971
972
  };
972
973
  }
973
974
  }
@@ -975,14 +976,8 @@ declare module '@tiptap/core' {
975
976
 
976
977
  declare module '@tiptap/core' {
977
978
  interface Commands<ReturnType> {
978
- search: {
979
- setSearchTerm: (searchTerm: string) => ReturnType;
980
- setReplaceTerm: (replaceTerm: string) => ReturnType;
981
- replace: () => ReturnType;
982
- replaceAll: () => ReturnType;
983
- goToPrevSearchResult: () => void;
984
- goToNextSearchResult: () => void;
985
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
979
+ katex: {
980
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
986
981
  };
987
982
  }
988
983
  }
@@ -990,9 +985,14 @@ declare module '@tiptap/core' {
990
985
 
991
986
  declare module '@tiptap/core' {
992
987
  interface Commands<ReturnType> {
993
- tableCellBackground: {
994
- setTableCellBackground: (color: string) => ReturnType;
995
- unsetTableCellBackground: () => ReturnType;
988
+ iframe: {
989
+ /**
990
+ * Add an iframe
991
+ */
992
+ setIframe: (options: {
993
+ src: string;
994
+ service: string;
995
+ }) => ReturnType;
996
996
  };
997
997
  }
998
998
  }
@@ -1000,11 +1000,8 @@ declare module '@tiptap/core' {
1000
1000
 
1001
1001
  declare module '@tiptap/core' {
1002
1002
  interface Commands<ReturnType> {
1003
- emoji: {
1004
- setEmoji: (emoji: {
1005
- name: string;
1006
- emoji: string;
1007
- }) => ReturnType;
1003
+ painter: {
1004
+ setPainter: (marks: Mark[]) => ReturnType;
1008
1005
  };
1009
1006
  }
1010
1007
  }
@@ -1012,19 +1009,14 @@ declare module '@tiptap/core' {
1012
1009
 
1013
1010
  declare module '@tiptap/core' {
1014
1011
  interface Commands<ReturnType> {
1015
- imageUpload: {
1016
- /**
1017
- * Add an image
1018
- */
1019
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1020
- /**
1021
- * Update an image
1022
- */
1023
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1024
- /**
1025
- * Set image alignment
1026
- */
1027
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
1012
+ search: {
1013
+ setSearchTerm: (searchTerm: string) => ReturnType;
1014
+ setReplaceTerm: (replaceTerm: string) => ReturnType;
1015
+ replace: () => ReturnType;
1016
+ replaceAll: () => ReturnType;
1017
+ goToPrevSearchResult: () => void;
1018
+ goToNextSearchResult: () => void;
1019
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
1028
1020
  };
1029
1021
  }
1030
1022
  }
@@ -1032,8 +1024,13 @@ declare module '@tiptap/core' {
1032
1024
 
1033
1025
  declare module '@tiptap/core' {
1034
1026
  interface Commands<ReturnType> {
1035
- painter: {
1036
- setPainter: (marks: Mark[]) => ReturnType;
1027
+ columns: {
1028
+ insertColumns: (attrs?: {
1029
+ cols: number;
1030
+ }) => ReturnType;
1031
+ addColBefore: () => ReturnType;
1032
+ addColAfter: () => ReturnType;
1033
+ deleteCol: () => ReturnType;
1037
1034
  };
1038
1035
  }
1039
1036
  }
@@ -1041,8 +1038,11 @@ declare module '@tiptap/core' {
1041
1038
 
1042
1039
  declare module '@tiptap/core' {
1043
1040
  interface Commands<ReturnType> {
1044
- katex: {
1045
- setKatex: (arg?: IKatexAttrs) => ReturnType;
1041
+ emoji: {
1042
+ setEmoji: (emoji: {
1043
+ name: string;
1044
+ emoji: string;
1045
+ }) => ReturnType;
1046
1046
  };
1047
1047
  }
1048
1048
  }
@@ -1076,6 +1076,16 @@ declare module '@tiptap/core' {
1076
1076
  }
1077
1077
 
1078
1078
 
1079
+ declare module '@tiptap/core' {
1080
+ interface Commands<ReturnType> {
1081
+ mermaid: {
1082
+ setMermaid: (options: any, replace?: any) => ReturnType;
1083
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
1084
+ };
1085
+ }
1086
+ }
1087
+
1088
+
1079
1089
  declare module '@tiptap/core' {
1080
1090
  interface Commands<ReturnType> {
1081
1091
  imageGifUpload: {
@@ -1096,25 +1106,6 @@ declare module '@tiptap/core' {
1096
1106
  }
1097
1107
 
1098
1108
 
1099
- declare module '@tiptap/core' {
1100
- interface Commands<ReturnType> {
1101
- mermaid: {
1102
- setMermaid: (options: any, replace?: any) => ReturnType;
1103
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
1104
- };
1105
- }
1106
- }
1107
-
1108
-
1109
- declare module '@tiptap/core' {
1110
- interface Commands<ReturnType> {
1111
- attachment: {
1112
- setAttachment: (attrs?: unknown) => ReturnType;
1113
- };
1114
- }
1115
- }
1116
-
1117
-
1118
1109
  declare module '@tiptap/core' {
1119
1110
  interface Commands<ReturnType> {
1120
1111
  twitter: {
@@ -1138,3 +1129,12 @@ declare module '@tiptap/core' {
1138
1129
  };
1139
1130
  }
1140
1131
  }
1132
+
1133
+
1134
+ declare module '@tiptap/core' {
1135
+ interface Commands<ReturnType> {
1136
+ attachment: {
1137
+ setAttachment: (attrs?: unknown) => ReturnType;
1138
+ };
1139
+ }
1140
+ }
@@ -1,4 +1,4 @@
1
- import { a as e, b as l, l as o, e as _, c, d as h } from "./index-BngAFVnd.js";
1
+ import { a as e, b as l, l as o, e as _, c, d as h } from "./index-CGVy85-a.js";
2
2
  export {
3
3
  e as en,
4
4
  l as hu_HU,