reactjs-tiptap-editor 0.2.16 → 0.2.18

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.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react"),d=require("./RichTextEditor-qAjq5Zgy.cjs"),c=require("./tiptap-Ufn12SjW.cjs");function a(){var r;const e=t.useRef({editor:null}),[i,o]=t.useState(!1),[s,n]=t.useState(null);return t.useEffect(()=>{var u;(u=e.current)!=null&&u.editor&&(o(!0),n(e.current.editor))},[e,(r=e.current)==null?void 0:r.editor]),{isReady:i,editor:s,editorRef:e}}exports.default=d.RichTextEditor;exports.BubbleMenu=c.BubbleMenu;exports.useEditorState=a;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react"),d=require("./RichTextEditor-CGcy7xvW.cjs"),c=require("./tiptap-Ufn12SjW.cjs");function a(){var r;const e=t.useRef({editor:null}),[i,o]=t.useState(!1),[s,n]=t.useState(null);return t.useEffect(()=>{var u;(u=e.current)!=null&&u.editor&&(o(!0),n(e.current.editor))},[e,(r=e.current)==null?void 0:r.editor]),{isReady:i,editor:s,editorRef:e}}exports.default=d.RichTextEditor;exports.BubbleMenu=c.BubbleMenu;exports.useEditorState=a;
package/lib/index.d.cts CHANGED
@@ -267,9 +267,9 @@ declare module '@tiptap/core' {
267
267
 
268
268
  declare module '@tiptap/core' {
269
269
  interface Commands<ReturnType> {
270
- lineHeight: {
271
- setLineHeight: (lineHeight: string) => ReturnType;
272
- unsetLineHeight: () => ReturnType;
270
+ tableCellBackground: {
271
+ setTableCellBackground: (color: string) => ReturnType;
272
+ unsetTableCellBackground: () => ReturnType;
273
273
  };
274
274
  }
275
275
  }
@@ -277,14 +277,8 @@ declare module '@tiptap/core' {
277
277
 
278
278
  declare module '@tiptap/core' {
279
279
  interface Commands<ReturnType> {
280
- iframe: {
281
- /**
282
- * Add an iframe
283
- */
284
- setIframe: (options: {
285
- src: string;
286
- service: string;
287
- }) => ReturnType;
280
+ painter: {
281
+ setPainter: (marks: Mark[]) => ReturnType;
288
282
  };
289
283
  }
290
284
  }
@@ -292,10 +286,13 @@ declare module '@tiptap/core' {
292
286
 
293
287
  declare module '@tiptap/core' {
294
288
  interface Commands<ReturnType> {
295
- emoji: {
296
- setEmoji: (emoji: {
297
- name: string;
298
- emoji: string;
289
+ iframe: {
290
+ /**
291
+ * Add an iframe
292
+ */
293
+ setIframe: (options: {
294
+ src: string;
295
+ service: string;
299
296
  }) => ReturnType;
300
297
  };
301
298
  }
@@ -313,38 +310,9 @@ declare module '@tiptap/core' {
313
310
 
314
311
  declare module '@tiptap/core' {
315
312
  interface Commands<ReturnType> {
316
- imageUpload: {
317
- /**
318
- * Add an image
319
- */
320
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
321
- /**
322
- * Update an image
323
- */
324
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
325
- /**
326
- * Set image alignment
327
- */
328
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
329
- };
330
- }
331
- }
332
-
333
-
334
- declare module '@tiptap/core' {
335
- interface Commands<ReturnType> {
336
- painter: {
337
- setPainter: (marks: Mark[]) => ReturnType;
338
- };
339
- }
340
- }
341
-
342
-
343
- declare module '@tiptap/core' {
344
- interface Commands<ReturnType> {
345
- tableCellBackground: {
346
- setTableCellBackground: (color: string) => ReturnType;
347
- unsetTableCellBackground: () => ReturnType;
313
+ lineHeight: {
314
+ setLineHeight: (lineHeight: string) => ReturnType;
315
+ unsetLineHeight: () => ReturnType;
348
316
  };
349
317
  }
350
318
  }
@@ -381,8 +349,11 @@ declare module '@tiptap/core' {
381
349
 
382
350
  declare module '@tiptap/core' {
383
351
  interface Commands<ReturnType> {
384
- exportWord: {
385
- exportToWord: () => ReturnType;
352
+ emoji: {
353
+ setEmoji: (emoji: {
354
+ name: string;
355
+ emoji: string;
356
+ }) => ReturnType;
386
357
  };
387
358
  }
388
359
  }
@@ -390,9 +361,19 @@ declare module '@tiptap/core' {
390
361
 
391
362
  declare module '@tiptap/core' {
392
363
  interface Commands<ReturnType> {
393
- tableOfContents: {
394
- setTableOfContents: () => ReturnType;
395
- removeTableOfContents: () => ReturnType;
364
+ imageUpload: {
365
+ /**
366
+ * Add an image
367
+ */
368
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
369
+ /**
370
+ * Update an image
371
+ */
372
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
373
+ /**
374
+ * Set image alignment
375
+ */
376
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
396
377
  };
397
378
  }
398
379
  }
@@ -400,8 +381,8 @@ declare module '@tiptap/core' {
400
381
 
401
382
  declare module '@tiptap/core' {
402
383
  interface Commands<ReturnType> {
403
- excalidraw: {
404
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
384
+ exportWord: {
385
+ exportToWord: () => ReturnType;
405
386
  };
406
387
  }
407
388
  }
@@ -409,8 +390,9 @@ declare module '@tiptap/core' {
409
390
 
410
391
  declare module '@tiptap/core' {
411
392
  interface Commands<ReturnType> {
412
- attachment: {
413
- setAttachment: (attrs?: unknown) => ReturnType;
393
+ tableOfContents: {
394
+ setTableOfContents: () => ReturnType;
395
+ removeTableOfContents: () => ReturnType;
414
396
  };
415
397
  }
416
398
  }
@@ -418,9 +400,8 @@ declare module '@tiptap/core' {
418
400
 
419
401
  declare module '@tiptap/core' {
420
402
  interface Commands<ReturnType> {
421
- mermaid: {
422
- setMermaid: (options: any, replace?: any) => ReturnType;
423
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
403
+ excalidraw: {
404
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
424
405
  };
425
406
  }
426
407
  }
@@ -456,6 +437,25 @@ declare module '@tiptap/core' {
456
437
  }
457
438
 
458
439
 
440
+ declare module '@tiptap/core' {
441
+ 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;
454
+ };
455
+ }
456
+ }
457
+
458
+
459
459
  declare module '@tiptap/core' {
460
460
  interface Commands<ReturnType> {
461
461
  twitter: {
package/lib/index.d.ts CHANGED
@@ -267,9 +267,9 @@ declare module '@tiptap/core' {
267
267
 
268
268
  declare module '@tiptap/core' {
269
269
  interface Commands<ReturnType> {
270
- lineHeight: {
271
- setLineHeight: (lineHeight: string) => ReturnType;
272
- unsetLineHeight: () => ReturnType;
270
+ tableCellBackground: {
271
+ setTableCellBackground: (color: string) => ReturnType;
272
+ unsetTableCellBackground: () => ReturnType;
273
273
  };
274
274
  }
275
275
  }
@@ -277,14 +277,8 @@ declare module '@tiptap/core' {
277
277
 
278
278
  declare module '@tiptap/core' {
279
279
  interface Commands<ReturnType> {
280
- iframe: {
281
- /**
282
- * Add an iframe
283
- */
284
- setIframe: (options: {
285
- src: string;
286
- service: string;
287
- }) => ReturnType;
280
+ painter: {
281
+ setPainter: (marks: Mark[]) => ReturnType;
288
282
  };
289
283
  }
290
284
  }
@@ -292,10 +286,13 @@ declare module '@tiptap/core' {
292
286
 
293
287
  declare module '@tiptap/core' {
294
288
  interface Commands<ReturnType> {
295
- emoji: {
296
- setEmoji: (emoji: {
297
- name: string;
298
- emoji: string;
289
+ iframe: {
290
+ /**
291
+ * Add an iframe
292
+ */
293
+ setIframe: (options: {
294
+ src: string;
295
+ service: string;
299
296
  }) => ReturnType;
300
297
  };
301
298
  }
@@ -313,38 +310,9 @@ declare module '@tiptap/core' {
313
310
 
314
311
  declare module '@tiptap/core' {
315
312
  interface Commands<ReturnType> {
316
- imageUpload: {
317
- /**
318
- * Add an image
319
- */
320
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
321
- /**
322
- * Update an image
323
- */
324
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
325
- /**
326
- * Set image alignment
327
- */
328
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
329
- };
330
- }
331
- }
332
-
333
-
334
- declare module '@tiptap/core' {
335
- interface Commands<ReturnType> {
336
- painter: {
337
- setPainter: (marks: Mark[]) => ReturnType;
338
- };
339
- }
340
- }
341
-
342
-
343
- declare module '@tiptap/core' {
344
- interface Commands<ReturnType> {
345
- tableCellBackground: {
346
- setTableCellBackground: (color: string) => ReturnType;
347
- unsetTableCellBackground: () => ReturnType;
313
+ lineHeight: {
314
+ setLineHeight: (lineHeight: string) => ReturnType;
315
+ unsetLineHeight: () => ReturnType;
348
316
  };
349
317
  }
350
318
  }
@@ -381,8 +349,11 @@ declare module '@tiptap/core' {
381
349
 
382
350
  declare module '@tiptap/core' {
383
351
  interface Commands<ReturnType> {
384
- exportWord: {
385
- exportToWord: () => ReturnType;
352
+ emoji: {
353
+ setEmoji: (emoji: {
354
+ name: string;
355
+ emoji: string;
356
+ }) => ReturnType;
386
357
  };
387
358
  }
388
359
  }
@@ -390,9 +361,19 @@ declare module '@tiptap/core' {
390
361
 
391
362
  declare module '@tiptap/core' {
392
363
  interface Commands<ReturnType> {
393
- tableOfContents: {
394
- setTableOfContents: () => ReturnType;
395
- removeTableOfContents: () => ReturnType;
364
+ imageUpload: {
365
+ /**
366
+ * Add an image
367
+ */
368
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
369
+ /**
370
+ * Update an image
371
+ */
372
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
373
+ /**
374
+ * Set image alignment
375
+ */
376
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
396
377
  };
397
378
  }
398
379
  }
@@ -400,8 +381,8 @@ declare module '@tiptap/core' {
400
381
 
401
382
  declare module '@tiptap/core' {
402
383
  interface Commands<ReturnType> {
403
- excalidraw: {
404
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
384
+ exportWord: {
385
+ exportToWord: () => ReturnType;
405
386
  };
406
387
  }
407
388
  }
@@ -409,8 +390,9 @@ declare module '@tiptap/core' {
409
390
 
410
391
  declare module '@tiptap/core' {
411
392
  interface Commands<ReturnType> {
412
- attachment: {
413
- setAttachment: (attrs?: unknown) => ReturnType;
393
+ tableOfContents: {
394
+ setTableOfContents: () => ReturnType;
395
+ removeTableOfContents: () => ReturnType;
414
396
  };
415
397
  }
416
398
  }
@@ -418,9 +400,8 @@ declare module '@tiptap/core' {
418
400
 
419
401
  declare module '@tiptap/core' {
420
402
  interface Commands<ReturnType> {
421
- mermaid: {
422
- setMermaid: (options: any, replace?: any) => ReturnType;
423
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
403
+ excalidraw: {
404
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
424
405
  };
425
406
  }
426
407
  }
@@ -456,6 +437,25 @@ declare module '@tiptap/core' {
456
437
  }
457
438
 
458
439
 
440
+ declare module '@tiptap/core' {
441
+ 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;
454
+ };
455
+ }
456
+ }
457
+
458
+
459
459
  declare module '@tiptap/core' {
460
460
  interface Commands<ReturnType> {
461
461
  twitter: {
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-BOdtmts1.js";
2
+ import { R as m } from "./RichTextEditor-Bja02y2o.js";
3
3
  import { B as x } from "./tiptap-BV9BUpUC.js";
4
4
  function c() {
5
5
  var t;
@@ -936,9 +936,9 @@ declare module '@tiptap/core' {
936
936
 
937
937
  declare module '@tiptap/core' {
938
938
  interface Commands<ReturnType> {
939
- lineHeight: {
940
- setLineHeight: (lineHeight: string) => ReturnType;
941
- unsetLineHeight: () => ReturnType;
939
+ tableCellBackground: {
940
+ setTableCellBackground: (color: string) => ReturnType;
941
+ unsetTableCellBackground: () => ReturnType;
942
942
  };
943
943
  }
944
944
  }
@@ -946,14 +946,8 @@ declare module '@tiptap/core' {
946
946
 
947
947
  declare module '@tiptap/core' {
948
948
  interface Commands<ReturnType> {
949
- iframe: {
950
- /**
951
- * Add an iframe
952
- */
953
- setIframe: (options: {
954
- src: string;
955
- service: string;
956
- }) => ReturnType;
949
+ painter: {
950
+ setPainter: (marks: Mark[]) => ReturnType;
957
951
  };
958
952
  }
959
953
  }
@@ -961,10 +955,13 @@ declare module '@tiptap/core' {
961
955
 
962
956
  declare module '@tiptap/core' {
963
957
  interface Commands<ReturnType> {
964
- emoji: {
965
- setEmoji: (emoji: {
966
- name: string;
967
- emoji: string;
958
+ iframe: {
959
+ /**
960
+ * Add an iframe
961
+ */
962
+ setIframe: (options: {
963
+ src: string;
964
+ service: string;
968
965
  }) => ReturnType;
969
966
  };
970
967
  }
@@ -982,38 +979,9 @@ declare module '@tiptap/core' {
982
979
 
983
980
  declare module '@tiptap/core' {
984
981
  interface Commands<ReturnType> {
985
- imageUpload: {
986
- /**
987
- * Add an image
988
- */
989
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
990
- /**
991
- * Update an image
992
- */
993
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
994
- /**
995
- * Set image alignment
996
- */
997
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
998
- };
999
- }
1000
- }
1001
-
1002
-
1003
- declare module '@tiptap/core' {
1004
- interface Commands<ReturnType> {
1005
- painter: {
1006
- setPainter: (marks: Mark[]) => ReturnType;
1007
- };
1008
- }
1009
- }
1010
-
1011
-
1012
- declare module '@tiptap/core' {
1013
- interface Commands<ReturnType> {
1014
- tableCellBackground: {
1015
- setTableCellBackground: (color: string) => ReturnType;
1016
- unsetTableCellBackground: () => ReturnType;
982
+ lineHeight: {
983
+ setLineHeight: (lineHeight: string) => ReturnType;
984
+ unsetLineHeight: () => ReturnType;
1017
985
  };
1018
986
  }
1019
987
  }
@@ -1050,8 +1018,11 @@ declare module '@tiptap/core' {
1050
1018
 
1051
1019
  declare module '@tiptap/core' {
1052
1020
  interface Commands<ReturnType> {
1053
- exportWord: {
1054
- exportToWord: () => ReturnType;
1021
+ emoji: {
1022
+ setEmoji: (emoji: {
1023
+ name: string;
1024
+ emoji: string;
1025
+ }) => ReturnType;
1055
1026
  };
1056
1027
  }
1057
1028
  }
@@ -1059,9 +1030,19 @@ declare module '@tiptap/core' {
1059
1030
 
1060
1031
  declare module '@tiptap/core' {
1061
1032
  interface Commands<ReturnType> {
1062
- tableOfContents: {
1063
- setTableOfContents: () => ReturnType;
1064
- removeTableOfContents: () => ReturnType;
1033
+ imageUpload: {
1034
+ /**
1035
+ * Add an image
1036
+ */
1037
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1038
+ /**
1039
+ * Update an image
1040
+ */
1041
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1042
+ /**
1043
+ * Set image alignment
1044
+ */
1045
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
1065
1046
  };
1066
1047
  }
1067
1048
  }
@@ -1069,8 +1050,8 @@ declare module '@tiptap/core' {
1069
1050
 
1070
1051
  declare module '@tiptap/core' {
1071
1052
  interface Commands<ReturnType> {
1072
- excalidraw: {
1073
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1053
+ exportWord: {
1054
+ exportToWord: () => ReturnType;
1074
1055
  };
1075
1056
  }
1076
1057
  }
@@ -1078,8 +1059,9 @@ declare module '@tiptap/core' {
1078
1059
 
1079
1060
  declare module '@tiptap/core' {
1080
1061
  interface Commands<ReturnType> {
1081
- attachment: {
1082
- setAttachment: (attrs?: unknown) => ReturnType;
1062
+ tableOfContents: {
1063
+ setTableOfContents: () => ReturnType;
1064
+ removeTableOfContents: () => ReturnType;
1083
1065
  };
1084
1066
  }
1085
1067
  }
@@ -1087,9 +1069,8 @@ declare module '@tiptap/core' {
1087
1069
 
1088
1070
  declare module '@tiptap/core' {
1089
1071
  interface Commands<ReturnType> {
1090
- mermaid: {
1091
- setMermaid: (options: any, replace?: any) => ReturnType;
1092
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
1072
+ excalidraw: {
1073
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1093
1074
  };
1094
1075
  }
1095
1076
  }
@@ -1125,6 +1106,25 @@ declare module '@tiptap/core' {
1125
1106
  }
1126
1107
 
1127
1108
 
1109
+ declare module '@tiptap/core' {
1110
+ 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;
1123
+ };
1124
+ }
1125
+ }
1126
+
1127
+
1128
1128
  declare module '@tiptap/core' {
1129
1129
  interface Commands<ReturnType> {
1130
1130
  twitter: {