reactjs-tiptap-editor-pro 0.2.27 → 0.2.28

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.cts CHANGED
@@ -301,8 +301,19 @@ declare module '@tiptap/core' {
301
301
 
302
302
  declare module '@tiptap/core' {
303
303
  interface Commands<ReturnType> {
304
- katex: {
305
- setKatex: (arg?: IKatexAttrs) => ReturnType;
304
+ imageUpload: {
305
+ /**
306
+ * Add an image
307
+ */
308
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
309
+ /**
310
+ * Update an image
311
+ */
312
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
313
+ /**
314
+ * Set image alignment
315
+ */
316
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
306
317
  };
307
318
  }
308
319
  }
@@ -310,14 +321,22 @@ declare module '@tiptap/core' {
310
321
 
311
322
  declare module '@tiptap/core' {
312
323
  interface Commands<ReturnType> {
313
- iframe: {
314
- /**
315
- * Add an iframe
316
- */
317
- setIframe: (options: {
318
- src: string;
319
- service: string;
324
+ columns: {
325
+ insertColumns: (attrs?: {
326
+ cols: number;
320
327
  }) => ReturnType;
328
+ addColBefore: () => ReturnType;
329
+ addColAfter: () => ReturnType;
330
+ deleteCol: () => ReturnType;
331
+ };
332
+ }
333
+ }
334
+
335
+
336
+ declare module '@tiptap/core' {
337
+ interface Commands<ReturnType> {
338
+ painter: {
339
+ setPainter: (marks: Mark[]) => ReturnType;
321
340
  };
322
341
  }
323
342
  }
@@ -337,8 +356,9 @@ declare module '@tiptap/core' {
337
356
 
338
357
  declare module '@tiptap/core' {
339
358
  interface Commands<ReturnType> {
340
- painter: {
341
- setPainter: (marks: Mark[]) => ReturnType;
359
+ tableCellBackground: {
360
+ setTableCellBackground: (color: string) => ReturnType;
361
+ unsetTableCellBackground: () => ReturnType;
342
362
  };
343
363
  }
344
364
  }
@@ -346,8 +366,15 @@ declare module '@tiptap/core' {
346
366
 
347
367
  declare module '@tiptap/core' {
348
368
  interface Commands<ReturnType> {
349
- exportWord: {
350
- exportToWord: () => ReturnType;
369
+ indent: {
370
+ /**
371
+ * Set the indent attribute
372
+ */
373
+ indent: () => ReturnType;
374
+ /**
375
+ * Set the outdent attribute
376
+ */
377
+ outdent: () => ReturnType;
351
378
  };
352
379
  }
353
380
  }
@@ -355,19 +382,14 @@ declare module '@tiptap/core' {
355
382
 
356
383
  declare module '@tiptap/core' {
357
384
  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;
385
+ iframe: {
367
386
  /**
368
- * Set image alignment
387
+ * Add an iframe
369
388
  */
370
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
389
+ setIframe: (options: {
390
+ src: string;
391
+ service: string;
392
+ }) => ReturnType;
371
393
  };
372
394
  }
373
395
  }
@@ -390,25 +412,8 @@ declare module '@tiptap/core' {
390
412
 
391
413
  declare module '@tiptap/core' {
392
414
  interface Commands<ReturnType> {
393
- tableCellBackground: {
394
- setTableCellBackground: (color: string) => ReturnType;
395
- unsetTableCellBackground: () => ReturnType;
396
- };
397
- }
398
- }
399
-
400
-
401
- declare module '@tiptap/core' {
402
- 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
+ exportWord: {
416
+ exportToWord: () => ReturnType;
412
417
  };
413
418
  }
414
419
  }
@@ -416,13 +421,8 @@ declare module '@tiptap/core' {
416
421
 
417
422
  declare module '@tiptap/core' {
418
423
  interface Commands<ReturnType> {
419
- columns: {
420
- insertColumns: (attrs?: {
421
- cols: number;
422
- }) => ReturnType;
423
- addColBefore: () => ReturnType;
424
- addColAfter: () => ReturnType;
425
- deleteCol: () => ReturnType;
424
+ excalidraw: {
425
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
426
426
  };
427
427
  }
428
428
  }
@@ -430,8 +430,9 @@ declare module '@tiptap/core' {
430
430
 
431
431
  declare module '@tiptap/core' {
432
432
  interface Commands<ReturnType> {
433
- excalidraw: {
434
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
433
+ tableOfContents: {
434
+ setTableOfContents: () => ReturnType;
435
+ removeTableOfContents: () => ReturnType;
435
436
  };
436
437
  }
437
438
  }
@@ -439,9 +440,8 @@ declare module '@tiptap/core' {
439
440
 
440
441
  declare module '@tiptap/core' {
441
442
  interface Commands<ReturnType> {
442
- tableOfContents: {
443
- setTableOfContents: () => ReturnType;
444
- removeTableOfContents: () => ReturnType;
443
+ katex: {
444
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
445
445
  };
446
446
  }
447
447
  }
@@ -469,14 +469,9 @@ declare module '@tiptap/core' {
469
469
 
470
470
  declare module '@tiptap/core' {
471
471
  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;
472
+ mermaid: {
473
+ setMermaid: (options: any, replace?: any) => ReturnType;
474
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
480
475
  };
481
476
  }
482
477
  }
@@ -484,9 +479,8 @@ declare module '@tiptap/core' {
484
479
 
485
480
  declare module '@tiptap/core' {
486
481
  interface Commands<ReturnType> {
487
- drawer: {
488
- setDrawer: (options: any, replace?: any) => ReturnType;
489
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
482
+ attachment: {
483
+ setAttachment: (attrs?: unknown) => ReturnType;
490
484
  };
491
485
  }
492
486
  }
@@ -494,9 +488,14 @@ declare module '@tiptap/core' {
494
488
 
495
489
  declare module '@tiptap/core' {
496
490
  interface Commands<ReturnType> {
497
- mermaid: {
498
- setMermaid: (options: any, replace?: any) => ReturnType;
499
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => 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;
500
499
  };
501
500
  }
502
501
  }
@@ -504,8 +503,9 @@ declare module '@tiptap/core' {
504
503
 
505
504
  declare module '@tiptap/core' {
506
505
  interface Commands<ReturnType> {
507
- attachment: {
508
- setAttachment: (attrs?: unknown) => ReturnType;
506
+ drawer: {
507
+ setDrawer: (options: any, replace?: any) => ReturnType;
508
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
509
509
  };
510
510
  }
511
511
  }
package/lib/index.d.ts CHANGED
@@ -301,8 +301,19 @@ declare module '@tiptap/core' {
301
301
 
302
302
  declare module '@tiptap/core' {
303
303
  interface Commands<ReturnType> {
304
- katex: {
305
- setKatex: (arg?: IKatexAttrs) => ReturnType;
304
+ imageUpload: {
305
+ /**
306
+ * Add an image
307
+ */
308
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
309
+ /**
310
+ * Update an image
311
+ */
312
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
313
+ /**
314
+ * Set image alignment
315
+ */
316
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
306
317
  };
307
318
  }
308
319
  }
@@ -310,14 +321,22 @@ declare module '@tiptap/core' {
310
321
 
311
322
  declare module '@tiptap/core' {
312
323
  interface Commands<ReturnType> {
313
- iframe: {
314
- /**
315
- * Add an iframe
316
- */
317
- setIframe: (options: {
318
- src: string;
319
- service: string;
324
+ columns: {
325
+ insertColumns: (attrs?: {
326
+ cols: number;
320
327
  }) => ReturnType;
328
+ addColBefore: () => ReturnType;
329
+ addColAfter: () => ReturnType;
330
+ deleteCol: () => ReturnType;
331
+ };
332
+ }
333
+ }
334
+
335
+
336
+ declare module '@tiptap/core' {
337
+ interface Commands<ReturnType> {
338
+ painter: {
339
+ setPainter: (marks: Mark[]) => ReturnType;
321
340
  };
322
341
  }
323
342
  }
@@ -337,8 +356,9 @@ declare module '@tiptap/core' {
337
356
 
338
357
  declare module '@tiptap/core' {
339
358
  interface Commands<ReturnType> {
340
- painter: {
341
- setPainter: (marks: Mark[]) => ReturnType;
359
+ tableCellBackground: {
360
+ setTableCellBackground: (color: string) => ReturnType;
361
+ unsetTableCellBackground: () => ReturnType;
342
362
  };
343
363
  }
344
364
  }
@@ -346,8 +366,15 @@ declare module '@tiptap/core' {
346
366
 
347
367
  declare module '@tiptap/core' {
348
368
  interface Commands<ReturnType> {
349
- exportWord: {
350
- exportToWord: () => ReturnType;
369
+ indent: {
370
+ /**
371
+ * Set the indent attribute
372
+ */
373
+ indent: () => ReturnType;
374
+ /**
375
+ * Set the outdent attribute
376
+ */
377
+ outdent: () => ReturnType;
351
378
  };
352
379
  }
353
380
  }
@@ -355,19 +382,14 @@ declare module '@tiptap/core' {
355
382
 
356
383
  declare module '@tiptap/core' {
357
384
  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;
385
+ iframe: {
367
386
  /**
368
- * Set image alignment
387
+ * Add an iframe
369
388
  */
370
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
389
+ setIframe: (options: {
390
+ src: string;
391
+ service: string;
392
+ }) => ReturnType;
371
393
  };
372
394
  }
373
395
  }
@@ -390,25 +412,8 @@ declare module '@tiptap/core' {
390
412
 
391
413
  declare module '@tiptap/core' {
392
414
  interface Commands<ReturnType> {
393
- tableCellBackground: {
394
- setTableCellBackground: (color: string) => ReturnType;
395
- unsetTableCellBackground: () => ReturnType;
396
- };
397
- }
398
- }
399
-
400
-
401
- declare module '@tiptap/core' {
402
- 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
+ exportWord: {
416
+ exportToWord: () => ReturnType;
412
417
  };
413
418
  }
414
419
  }
@@ -416,13 +421,8 @@ declare module '@tiptap/core' {
416
421
 
417
422
  declare module '@tiptap/core' {
418
423
  interface Commands<ReturnType> {
419
- columns: {
420
- insertColumns: (attrs?: {
421
- cols: number;
422
- }) => ReturnType;
423
- addColBefore: () => ReturnType;
424
- addColAfter: () => ReturnType;
425
- deleteCol: () => ReturnType;
424
+ excalidraw: {
425
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
426
426
  };
427
427
  }
428
428
  }
@@ -430,8 +430,9 @@ declare module '@tiptap/core' {
430
430
 
431
431
  declare module '@tiptap/core' {
432
432
  interface Commands<ReturnType> {
433
- excalidraw: {
434
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
433
+ tableOfContents: {
434
+ setTableOfContents: () => ReturnType;
435
+ removeTableOfContents: () => ReturnType;
435
436
  };
436
437
  }
437
438
  }
@@ -439,9 +440,8 @@ declare module '@tiptap/core' {
439
440
 
440
441
  declare module '@tiptap/core' {
441
442
  interface Commands<ReturnType> {
442
- tableOfContents: {
443
- setTableOfContents: () => ReturnType;
444
- removeTableOfContents: () => ReturnType;
443
+ katex: {
444
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
445
445
  };
446
446
  }
447
447
  }
@@ -469,14 +469,9 @@ declare module '@tiptap/core' {
469
469
 
470
470
  declare module '@tiptap/core' {
471
471
  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;
472
+ mermaid: {
473
+ setMermaid: (options: any, replace?: any) => ReturnType;
474
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
480
475
  };
481
476
  }
482
477
  }
@@ -484,9 +479,8 @@ declare module '@tiptap/core' {
484
479
 
485
480
  declare module '@tiptap/core' {
486
481
  interface Commands<ReturnType> {
487
- drawer: {
488
- setDrawer: (options: any, replace?: any) => ReturnType;
489
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
482
+ attachment: {
483
+ setAttachment: (attrs?: unknown) => ReturnType;
490
484
  };
491
485
  }
492
486
  }
@@ -494,9 +488,14 @@ declare module '@tiptap/core' {
494
488
 
495
489
  declare module '@tiptap/core' {
496
490
  interface Commands<ReturnType> {
497
- mermaid: {
498
- setMermaid: (options: any, replace?: any) => ReturnType;
499
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => 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;
500
499
  };
501
500
  }
502
501
  }
@@ -504,8 +503,9 @@ declare module '@tiptap/core' {
504
503
 
505
504
  declare module '@tiptap/core' {
506
505
  interface Commands<ReturnType> {
507
- attachment: {
508
- setAttachment: (attrs?: unknown) => ReturnType;
506
+ drawer: {
507
+ setDrawer: (options: any, replace?: any) => ReturnType;
508
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
509
509
  };
510
510
  }
511
511
  }
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-BC85Dn21.js";
3
3
  import { B as x } from "./tiptap-DkWHMWDt.js";
4
4
  function c() {
5
5
  var t;