reactjs-tiptap-editor-pro 0.2.37 → 0.2.39

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
@@ -290,19 +290,17 @@ declare module '@tiptap/core' {
290
290
 
291
291
  declare module '@tiptap/core' {
292
292
  interface Commands<ReturnType> {
293
- imageUpload: {
294
- /**
295
- * Add an image
296
- */
297
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
293
+ fontSize: {
298
294
  /**
299
- * Update an image
295
+ * Set the text font size. ex: "12px", "2em", or "small". Must be a valid
296
+ * CSS font-size
297
+ * (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size).
300
298
  */
301
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
299
+ setFontSize: (fontSize: string) => ReturnType;
302
300
  /**
303
- * Set image alignment
301
+ * Unset the font size
304
302
  */
305
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
303
+ unsetFontSize: () => ReturnType;
306
304
  };
307
305
  }
308
306
  }
@@ -310,14 +308,9 @@ declare module '@tiptap/core' {
310
308
 
311
309
  declare module '@tiptap/core' {
312
310
  interface Commands<ReturnType> {
313
- iframe: {
314
- /**
315
- * Add an iframe
316
- */
317
- setIframe: (options: {
318
- src: string;
319
- service: string;
320
- }) => ReturnType;
311
+ tableCellBackground: {
312
+ setTableCellBackground: (color: string) => ReturnType;
313
+ unsetTableCellBackground: () => ReturnType;
321
314
  };
322
315
  }
323
316
  }
@@ -325,15 +318,14 @@ declare module '@tiptap/core' {
325
318
 
326
319
  declare module '@tiptap/core' {
327
320
  interface Commands<ReturnType> {
328
- indent: {
329
- /**
330
- * Set the indent attribute
331
- */
332
- indent: () => ReturnType;
321
+ iframe: {
333
322
  /**
334
- * Set the outdent attribute
323
+ * Add an iframe
335
324
  */
336
- outdent: () => ReturnType;
325
+ setIframe: (options: {
326
+ src: string;
327
+ service: string;
328
+ }) => ReturnType;
337
329
  };
338
330
  }
339
331
  }
@@ -341,9 +333,8 @@ declare module '@tiptap/core' {
341
333
 
342
334
  declare module '@tiptap/core' {
343
335
  interface Commands<ReturnType> {
344
- lineHeight: {
345
- setLineHeight: (lineHeight: string) => ReturnType;
346
- unsetLineHeight: () => ReturnType;
336
+ painter: {
337
+ setPainter: (marks: Mark[]) => ReturnType;
347
338
  };
348
339
  }
349
340
  }
@@ -351,11 +342,14 @@ declare module '@tiptap/core' {
351
342
 
352
343
  declare module '@tiptap/core' {
353
344
  interface Commands<ReturnType> {
354
- emoji: {
355
- setEmoji: (emoji: {
356
- name: string;
357
- emoji: string;
358
- }) => ReturnType;
345
+ search: {
346
+ setSearchTerm: (searchTerm: string) => ReturnType;
347
+ setReplaceTerm: (replaceTerm: string) => ReturnType;
348
+ replace: () => ReturnType;
349
+ replaceAll: () => ReturnType;
350
+ goToPrevSearchResult: () => void;
351
+ goToNextSearchResult: () => void;
352
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
359
353
  };
360
354
  }
361
355
  }
@@ -363,17 +357,9 @@ declare module '@tiptap/core' {
363
357
 
364
358
  declare module '@tiptap/core' {
365
359
  interface Commands<ReturnType> {
366
- fontSize: {
367
- /**
368
- * Set the text font size. ex: "12px", "2em", or "small". Must be a valid
369
- * CSS font-size
370
- * (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size).
371
- */
372
- setFontSize: (fontSize: string) => ReturnType;
373
- /**
374
- * Unset the font size
375
- */
376
- unsetFontSize: () => ReturnType;
360
+ lineHeight: {
361
+ setLineHeight: (lineHeight: string) => ReturnType;
362
+ unsetLineHeight: () => ReturnType;
377
363
  };
378
364
  }
379
365
  }
@@ -381,9 +367,11 @@ declare module '@tiptap/core' {
381
367
 
382
368
  declare module '@tiptap/core' {
383
369
  interface Commands<ReturnType> {
384
- tableCellBackground: {
385
- setTableCellBackground: (color: string) => ReturnType;
386
- unsetTableCellBackground: () => ReturnType;
370
+ emoji: {
371
+ setEmoji: (emoji: {
372
+ name: string;
373
+ emoji: string;
374
+ }) => ReturnType;
387
375
  };
388
376
  }
389
377
  }
@@ -391,9 +379,8 @@ declare module '@tiptap/core' {
391
379
 
392
380
  declare module '@tiptap/core' {
393
381
  interface Commands<ReturnType> {
394
- tableOfContents: {
395
- setTableOfContents: () => ReturnType;
396
- removeTableOfContents: () => ReturnType;
382
+ katex: {
383
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
397
384
  };
398
385
  }
399
386
  }
@@ -401,8 +388,19 @@ declare module '@tiptap/core' {
401
388
 
402
389
  declare module '@tiptap/core' {
403
390
  interface Commands<ReturnType> {
404
- exportWord: {
405
- exportToWord: () => ReturnType;
391
+ imageUpload: {
392
+ /**
393
+ * Add an image
394
+ */
395
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
396
+ /**
397
+ * Update an image
398
+ */
399
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
400
+ /**
401
+ * Set image alignment
402
+ */
403
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
406
404
  };
407
405
  }
408
406
  }
@@ -410,8 +408,13 @@ declare module '@tiptap/core' {
410
408
 
411
409
  declare module '@tiptap/core' {
412
410
  interface Commands<ReturnType> {
413
- painter: {
414
- setPainter: (marks: Mark[]) => ReturnType;
411
+ columns: {
412
+ insertColumns: (attrs?: {
413
+ cols: number;
414
+ }) => ReturnType;
415
+ addColBefore: () => ReturnType;
416
+ addColAfter: () => ReturnType;
417
+ deleteCol: () => ReturnType;
415
418
  };
416
419
  }
417
420
  }
@@ -419,14 +422,15 @@ declare module '@tiptap/core' {
419
422
 
420
423
  declare module '@tiptap/core' {
421
424
  interface Commands<ReturnType> {
422
- search: {
423
- setSearchTerm: (searchTerm: string) => ReturnType;
424
- setReplaceTerm: (replaceTerm: string) => ReturnType;
425
- replace: () => ReturnType;
426
- replaceAll: () => ReturnType;
427
- goToPrevSearchResult: () => void;
428
- goToNextSearchResult: () => void;
429
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
425
+ indent: {
426
+ /**
427
+ * Set the indent attribute
428
+ */
429
+ indent: () => ReturnType;
430
+ /**
431
+ * Set the outdent attribute
432
+ */
433
+ outdent: () => ReturnType;
430
434
  };
431
435
  }
432
436
  }
@@ -434,13 +438,19 @@ declare module '@tiptap/core' {
434
438
 
435
439
  declare module '@tiptap/core' {
436
440
  interface Commands<ReturnType> {
437
- columns: {
438
- insertColumns: (attrs?: {
439
- cols: number;
440
- }) => ReturnType;
441
- addColBefore: () => ReturnType;
442
- addColAfter: () => ReturnType;
443
- deleteCol: () => ReturnType;
441
+ imageGifUpload: {
442
+ /**
443
+ * Add an image gif
444
+ */
445
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
446
+ /**
447
+ * Update an image gif
448
+ */
449
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
450
+ /**
451
+ * Set image alignment
452
+ */
453
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
444
454
  };
445
455
  }
446
456
  }
@@ -448,8 +458,9 @@ declare module '@tiptap/core' {
448
458
 
449
459
  declare module '@tiptap/core' {
450
460
  interface Commands<ReturnType> {
451
- katex: {
452
- setKatex: (arg?: IKatexAttrs) => ReturnType;
461
+ drawer: {
462
+ setDrawer: (options: any, replace?: any) => ReturnType;
463
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
453
464
  };
454
465
  }
455
466
  }
@@ -457,9 +468,9 @@ declare module '@tiptap/core' {
457
468
 
458
469
  declare module '@tiptap/core' {
459
470
  interface Commands<ReturnType> {
460
- mermaid: {
461
- setMermaid: (options: any, replace?: any) => ReturnType;
462
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
471
+ tableOfContents: {
472
+ setTableOfContents: () => ReturnType;
473
+ removeTableOfContents: () => ReturnType;
463
474
  };
464
475
  }
465
476
  }
@@ -476,19 +487,14 @@ declare module '@tiptap/core' {
476
487
 
477
488
  declare module '@tiptap/core' {
478
489
  interface Commands<ReturnType> {
479
- imageGifUpload: {
480
- /**
481
- * Add an image gif
482
- */
483
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
484
- /**
485
- * Update an image gif
486
- */
487
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
490
+ twitter: {
488
491
  /**
489
- * Set image alignment
492
+ * Insert a tweet
493
+ * @param options The tweet attributes
494
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
490
495
  */
491
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
496
+ setTweet: (options: SetTweetOptions) => ReturnType;
497
+ updateTweet: (options: SetTweetOptions) => ReturnType;
492
498
  };
493
499
  }
494
500
  }
@@ -496,14 +502,9 @@ declare module '@tiptap/core' {
496
502
 
497
503
  declare module '@tiptap/core' {
498
504
  interface Commands<ReturnType> {
499
- twitter: {
500
- /**
501
- * Insert a tweet
502
- * @param options The tweet attributes
503
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
504
- */
505
- setTweet: (options: SetTweetOptions) => ReturnType;
506
- updateTweet: (options: SetTweetOptions) => ReturnType;
505
+ mermaid: {
506
+ setMermaid: (options: any, replace?: any) => ReturnType;
507
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
507
508
  };
508
509
  }
509
510
  }
@@ -511,9 +512,8 @@ declare module '@tiptap/core' {
511
512
 
512
513
  declare module '@tiptap/core' {
513
514
  interface Commands<ReturnType> {
514
- drawer: {
515
- setDrawer: (options: any, replace?: any) => ReturnType;
516
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
515
+ exportWord: {
516
+ exportToWord: () => ReturnType;
517
517
  };
518
518
  }
519
519
  }
package/lib/index.d.ts CHANGED
@@ -290,19 +290,17 @@ declare module '@tiptap/core' {
290
290
 
291
291
  declare module '@tiptap/core' {
292
292
  interface Commands<ReturnType> {
293
- imageUpload: {
294
- /**
295
- * Add an image
296
- */
297
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
293
+ fontSize: {
298
294
  /**
299
- * Update an image
295
+ * Set the text font size. ex: "12px", "2em", or "small". Must be a valid
296
+ * CSS font-size
297
+ * (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size).
300
298
  */
301
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
299
+ setFontSize: (fontSize: string) => ReturnType;
302
300
  /**
303
- * Set image alignment
301
+ * Unset the font size
304
302
  */
305
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
303
+ unsetFontSize: () => ReturnType;
306
304
  };
307
305
  }
308
306
  }
@@ -310,14 +308,9 @@ declare module '@tiptap/core' {
310
308
 
311
309
  declare module '@tiptap/core' {
312
310
  interface Commands<ReturnType> {
313
- iframe: {
314
- /**
315
- * Add an iframe
316
- */
317
- setIframe: (options: {
318
- src: string;
319
- service: string;
320
- }) => ReturnType;
311
+ tableCellBackground: {
312
+ setTableCellBackground: (color: string) => ReturnType;
313
+ unsetTableCellBackground: () => ReturnType;
321
314
  };
322
315
  }
323
316
  }
@@ -325,15 +318,14 @@ declare module '@tiptap/core' {
325
318
 
326
319
  declare module '@tiptap/core' {
327
320
  interface Commands<ReturnType> {
328
- indent: {
329
- /**
330
- * Set the indent attribute
331
- */
332
- indent: () => ReturnType;
321
+ iframe: {
333
322
  /**
334
- * Set the outdent attribute
323
+ * Add an iframe
335
324
  */
336
- outdent: () => ReturnType;
325
+ setIframe: (options: {
326
+ src: string;
327
+ service: string;
328
+ }) => ReturnType;
337
329
  };
338
330
  }
339
331
  }
@@ -341,9 +333,8 @@ declare module '@tiptap/core' {
341
333
 
342
334
  declare module '@tiptap/core' {
343
335
  interface Commands<ReturnType> {
344
- lineHeight: {
345
- setLineHeight: (lineHeight: string) => ReturnType;
346
- unsetLineHeight: () => ReturnType;
336
+ painter: {
337
+ setPainter: (marks: Mark[]) => ReturnType;
347
338
  };
348
339
  }
349
340
  }
@@ -351,11 +342,14 @@ declare module '@tiptap/core' {
351
342
 
352
343
  declare module '@tiptap/core' {
353
344
  interface Commands<ReturnType> {
354
- emoji: {
355
- setEmoji: (emoji: {
356
- name: string;
357
- emoji: string;
358
- }) => ReturnType;
345
+ search: {
346
+ setSearchTerm: (searchTerm: string) => ReturnType;
347
+ setReplaceTerm: (replaceTerm: string) => ReturnType;
348
+ replace: () => ReturnType;
349
+ replaceAll: () => ReturnType;
350
+ goToPrevSearchResult: () => void;
351
+ goToNextSearchResult: () => void;
352
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
359
353
  };
360
354
  }
361
355
  }
@@ -363,17 +357,9 @@ declare module '@tiptap/core' {
363
357
 
364
358
  declare module '@tiptap/core' {
365
359
  interface Commands<ReturnType> {
366
- fontSize: {
367
- /**
368
- * Set the text font size. ex: "12px", "2em", or "small". Must be a valid
369
- * CSS font-size
370
- * (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size).
371
- */
372
- setFontSize: (fontSize: string) => ReturnType;
373
- /**
374
- * Unset the font size
375
- */
376
- unsetFontSize: () => ReturnType;
360
+ lineHeight: {
361
+ setLineHeight: (lineHeight: string) => ReturnType;
362
+ unsetLineHeight: () => ReturnType;
377
363
  };
378
364
  }
379
365
  }
@@ -381,9 +367,11 @@ declare module '@tiptap/core' {
381
367
 
382
368
  declare module '@tiptap/core' {
383
369
  interface Commands<ReturnType> {
384
- tableCellBackground: {
385
- setTableCellBackground: (color: string) => ReturnType;
386
- unsetTableCellBackground: () => ReturnType;
370
+ emoji: {
371
+ setEmoji: (emoji: {
372
+ name: string;
373
+ emoji: string;
374
+ }) => ReturnType;
387
375
  };
388
376
  }
389
377
  }
@@ -391,9 +379,8 @@ declare module '@tiptap/core' {
391
379
 
392
380
  declare module '@tiptap/core' {
393
381
  interface Commands<ReturnType> {
394
- tableOfContents: {
395
- setTableOfContents: () => ReturnType;
396
- removeTableOfContents: () => ReturnType;
382
+ katex: {
383
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
397
384
  };
398
385
  }
399
386
  }
@@ -401,8 +388,19 @@ declare module '@tiptap/core' {
401
388
 
402
389
  declare module '@tiptap/core' {
403
390
  interface Commands<ReturnType> {
404
- exportWord: {
405
- exportToWord: () => ReturnType;
391
+ imageUpload: {
392
+ /**
393
+ * Add an image
394
+ */
395
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
396
+ /**
397
+ * Update an image
398
+ */
399
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
400
+ /**
401
+ * Set image alignment
402
+ */
403
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
406
404
  };
407
405
  }
408
406
  }
@@ -410,8 +408,13 @@ declare module '@tiptap/core' {
410
408
 
411
409
  declare module '@tiptap/core' {
412
410
  interface Commands<ReturnType> {
413
- painter: {
414
- setPainter: (marks: Mark[]) => ReturnType;
411
+ columns: {
412
+ insertColumns: (attrs?: {
413
+ cols: number;
414
+ }) => ReturnType;
415
+ addColBefore: () => ReturnType;
416
+ addColAfter: () => ReturnType;
417
+ deleteCol: () => ReturnType;
415
418
  };
416
419
  }
417
420
  }
@@ -419,14 +422,15 @@ declare module '@tiptap/core' {
419
422
 
420
423
  declare module '@tiptap/core' {
421
424
  interface Commands<ReturnType> {
422
- search: {
423
- setSearchTerm: (searchTerm: string) => ReturnType;
424
- setReplaceTerm: (replaceTerm: string) => ReturnType;
425
- replace: () => ReturnType;
426
- replaceAll: () => ReturnType;
427
- goToPrevSearchResult: () => void;
428
- goToNextSearchResult: () => void;
429
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
425
+ indent: {
426
+ /**
427
+ * Set the indent attribute
428
+ */
429
+ indent: () => ReturnType;
430
+ /**
431
+ * Set the outdent attribute
432
+ */
433
+ outdent: () => ReturnType;
430
434
  };
431
435
  }
432
436
  }
@@ -434,13 +438,19 @@ declare module '@tiptap/core' {
434
438
 
435
439
  declare module '@tiptap/core' {
436
440
  interface Commands<ReturnType> {
437
- columns: {
438
- insertColumns: (attrs?: {
439
- cols: number;
440
- }) => ReturnType;
441
- addColBefore: () => ReturnType;
442
- addColAfter: () => ReturnType;
443
- deleteCol: () => ReturnType;
441
+ imageGifUpload: {
442
+ /**
443
+ * Add an image gif
444
+ */
445
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
446
+ /**
447
+ * Update an image gif
448
+ */
449
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
450
+ /**
451
+ * Set image alignment
452
+ */
453
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
444
454
  };
445
455
  }
446
456
  }
@@ -448,8 +458,9 @@ declare module '@tiptap/core' {
448
458
 
449
459
  declare module '@tiptap/core' {
450
460
  interface Commands<ReturnType> {
451
- katex: {
452
- setKatex: (arg?: IKatexAttrs) => ReturnType;
461
+ drawer: {
462
+ setDrawer: (options: any, replace?: any) => ReturnType;
463
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
453
464
  };
454
465
  }
455
466
  }
@@ -457,9 +468,9 @@ declare module '@tiptap/core' {
457
468
 
458
469
  declare module '@tiptap/core' {
459
470
  interface Commands<ReturnType> {
460
- mermaid: {
461
- setMermaid: (options: any, replace?: any) => ReturnType;
462
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
471
+ tableOfContents: {
472
+ setTableOfContents: () => ReturnType;
473
+ removeTableOfContents: () => ReturnType;
463
474
  };
464
475
  }
465
476
  }
@@ -476,19 +487,14 @@ declare module '@tiptap/core' {
476
487
 
477
488
  declare module '@tiptap/core' {
478
489
  interface Commands<ReturnType> {
479
- imageGifUpload: {
480
- /**
481
- * Add an image gif
482
- */
483
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
484
- /**
485
- * Update an image gif
486
- */
487
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
490
+ twitter: {
488
491
  /**
489
- * Set image alignment
492
+ * Insert a tweet
493
+ * @param options The tweet attributes
494
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
490
495
  */
491
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
496
+ setTweet: (options: SetTweetOptions) => ReturnType;
497
+ updateTweet: (options: SetTweetOptions) => ReturnType;
492
498
  };
493
499
  }
494
500
  }
@@ -496,14 +502,9 @@ declare module '@tiptap/core' {
496
502
 
497
503
  declare module '@tiptap/core' {
498
504
  interface Commands<ReturnType> {
499
- twitter: {
500
- /**
501
- * Insert a tweet
502
- * @param options The tweet attributes
503
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
504
- */
505
- setTweet: (options: SetTweetOptions) => ReturnType;
506
- updateTweet: (options: SetTweetOptions) => ReturnType;
505
+ mermaid: {
506
+ setMermaid: (options: any, replace?: any) => ReturnType;
507
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
507
508
  };
508
509
  }
509
510
  }
@@ -511,9 +512,8 @@ declare module '@tiptap/core' {
511
512
 
512
513
  declare module '@tiptap/core' {
513
514
  interface Commands<ReturnType> {
514
- drawer: {
515
- setDrawer: (options: any, replace?: any) => ReturnType;
516
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
515
+ exportWord: {
516
+ exportToWord: () => ReturnType;
517
517
  };
518
518
  }
519
519
  }