reactjs-tiptap-editor-pro 0.2.36 → 0.2.38
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/extension-bundle.d.cts +66 -66
- package/lib/extension-bundle.d.ts +66 -66
- package/lib/index.cjs +3 -3
- package/lib/index.d.cts +69 -67
- package/lib/index.d.ts +69 -67
- package/lib/index.js +66 -64
- package/lib/locale-bundle.d.cts +66 -66
- package/lib/locale-bundle.d.ts +66 -66
- package/package.json +1 -1
package/lib/index.d.cts
CHANGED
|
@@ -10,7 +10,9 @@ import { RefAttributes } from 'react';
|
|
|
10
10
|
import { TooltipContentProps } from '@radix-ui/react-tooltip';
|
|
11
11
|
import { UseEditorOptions } from '@tiptap/react';
|
|
12
12
|
|
|
13
|
-
declare
|
|
13
|
+
export declare const ActionButton: default_2.ForwardRefExoticComponent<Partial<ActionButtonProps> & default_2.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
|
|
15
|
+
export declare interface ActionButtonProps {
|
|
14
16
|
icon?: string;
|
|
15
17
|
title?: string;
|
|
16
18
|
tooltip?: string;
|
|
@@ -306,24 +308,15 @@ declare module '@tiptap/core' {
|
|
|
306
308
|
|
|
307
309
|
declare module '@tiptap/core' {
|
|
308
310
|
interface Commands<ReturnType> {
|
|
309
|
-
|
|
310
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
311
|
-
unsetLineHeight: () => ReturnType;
|
|
312
|
-
};
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
declare module '@tiptap/core' {
|
|
318
|
-
interface Commands<ReturnType> {
|
|
319
|
-
iframe: {
|
|
311
|
+
indent: {
|
|
320
312
|
/**
|
|
321
|
-
*
|
|
313
|
+
* Set the indent attribute
|
|
322
314
|
*/
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
315
|
+
indent: () => ReturnType;
|
|
316
|
+
/**
|
|
317
|
+
* Set the outdent attribute
|
|
318
|
+
*/
|
|
319
|
+
outdent: () => ReturnType;
|
|
327
320
|
};
|
|
328
321
|
}
|
|
329
322
|
}
|
|
@@ -331,9 +324,13 @@ declare module '@tiptap/core' {
|
|
|
331
324
|
|
|
332
325
|
declare module '@tiptap/core' {
|
|
333
326
|
interface Commands<ReturnType> {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
327
|
+
columns: {
|
|
328
|
+
insertColumns: (attrs?: {
|
|
329
|
+
cols: number;
|
|
330
|
+
}) => ReturnType;
|
|
331
|
+
addColBefore: () => ReturnType;
|
|
332
|
+
addColAfter: () => ReturnType;
|
|
333
|
+
deleteCol: () => ReturnType;
|
|
337
334
|
};
|
|
338
335
|
}
|
|
339
336
|
}
|
|
@@ -341,19 +338,9 @@ declare module '@tiptap/core' {
|
|
|
341
338
|
|
|
342
339
|
declare module '@tiptap/core' {
|
|
343
340
|
interface Commands<ReturnType> {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
*/
|
|
348
|
-
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
349
|
-
/**
|
|
350
|
-
* Update an image
|
|
351
|
-
*/
|
|
352
|
-
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
353
|
-
/**
|
|
354
|
-
* Set image alignment
|
|
355
|
-
*/
|
|
356
|
-
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
341
|
+
lineHeight: {
|
|
342
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
343
|
+
unsetLineHeight: () => ReturnType;
|
|
357
344
|
};
|
|
358
345
|
}
|
|
359
346
|
}
|
|
@@ -361,8 +348,8 @@ declare module '@tiptap/core' {
|
|
|
361
348
|
|
|
362
349
|
declare module '@tiptap/core' {
|
|
363
350
|
interface Commands<ReturnType> {
|
|
364
|
-
|
|
365
|
-
|
|
351
|
+
painter: {
|
|
352
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
366
353
|
};
|
|
367
354
|
}
|
|
368
355
|
}
|
|
@@ -370,13 +357,14 @@ declare module '@tiptap/core' {
|
|
|
370
357
|
|
|
371
358
|
declare module '@tiptap/core' {
|
|
372
359
|
interface Commands<ReturnType> {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
360
|
+
search: {
|
|
361
|
+
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
362
|
+
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
363
|
+
replace: () => ReturnType;
|
|
364
|
+
replaceAll: () => ReturnType;
|
|
365
|
+
goToPrevSearchResult: () => void;
|
|
366
|
+
goToNextSearchResult: () => void;
|
|
367
|
+
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
380
368
|
};
|
|
381
369
|
}
|
|
382
370
|
}
|
|
@@ -384,15 +372,19 @@ declare module '@tiptap/core' {
|
|
|
384
372
|
|
|
385
373
|
declare module '@tiptap/core' {
|
|
386
374
|
interface Commands<ReturnType> {
|
|
387
|
-
|
|
375
|
+
imageUpload: {
|
|
388
376
|
/**
|
|
389
|
-
*
|
|
377
|
+
* Add an image
|
|
390
378
|
*/
|
|
391
|
-
|
|
379
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
392
380
|
/**
|
|
393
|
-
*
|
|
381
|
+
* Update an image
|
|
394
382
|
*/
|
|
395
|
-
|
|
383
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
384
|
+
/**
|
|
385
|
+
* Set image alignment
|
|
386
|
+
*/
|
|
387
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
396
388
|
};
|
|
397
389
|
}
|
|
398
390
|
}
|
|
@@ -400,8 +392,14 @@ declare module '@tiptap/core' {
|
|
|
400
392
|
|
|
401
393
|
declare module '@tiptap/core' {
|
|
402
394
|
interface Commands<ReturnType> {
|
|
403
|
-
|
|
404
|
-
|
|
395
|
+
iframe: {
|
|
396
|
+
/**
|
|
397
|
+
* Add an iframe
|
|
398
|
+
*/
|
|
399
|
+
setIframe: (options: {
|
|
400
|
+
src: string;
|
|
401
|
+
service: string;
|
|
402
|
+
}) => ReturnType;
|
|
405
403
|
};
|
|
406
404
|
}
|
|
407
405
|
}
|
|
@@ -421,8 +419,9 @@ declare module '@tiptap/core' {
|
|
|
421
419
|
|
|
422
420
|
declare module '@tiptap/core' {
|
|
423
421
|
interface Commands<ReturnType> {
|
|
424
|
-
|
|
425
|
-
|
|
422
|
+
tableCellBackground: {
|
|
423
|
+
setTableCellBackground: (color: string) => ReturnType;
|
|
424
|
+
unsetTableCellBackground: () => ReturnType;
|
|
426
425
|
};
|
|
427
426
|
}
|
|
428
427
|
}
|
|
@@ -430,14 +429,8 @@ declare module '@tiptap/core' {
|
|
|
430
429
|
|
|
431
430
|
declare module '@tiptap/core' {
|
|
432
431
|
interface Commands<ReturnType> {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
436
|
-
replace: () => ReturnType;
|
|
437
|
-
replaceAll: () => ReturnType;
|
|
438
|
-
goToPrevSearchResult: () => void;
|
|
439
|
-
goToNextSearchResult: () => void;
|
|
440
|
-
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
432
|
+
katex: {
|
|
433
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
441
434
|
};
|
|
442
435
|
}
|
|
443
436
|
}
|
|
@@ -455,9 +448,8 @@ declare module '@tiptap/core' {
|
|
|
455
448
|
|
|
456
449
|
declare module '@tiptap/core' {
|
|
457
450
|
interface Commands<ReturnType> {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
451
|
+
exportWord: {
|
|
452
|
+
exportToWord: () => ReturnType;
|
|
461
453
|
};
|
|
462
454
|
}
|
|
463
455
|
}
|
|
@@ -465,9 +457,8 @@ declare module '@tiptap/core' {
|
|
|
465
457
|
|
|
466
458
|
declare module '@tiptap/core' {
|
|
467
459
|
interface Commands<ReturnType> {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
460
|
+
attachment: {
|
|
461
|
+
setAttachment: (attrs?: unknown) => ReturnType;
|
|
471
462
|
};
|
|
472
463
|
}
|
|
473
464
|
}
|
|
@@ -490,8 +481,19 @@ declare module '@tiptap/core' {
|
|
|
490
481
|
|
|
491
482
|
declare module '@tiptap/core' {
|
|
492
483
|
interface Commands<ReturnType> {
|
|
493
|
-
|
|
494
|
-
|
|
484
|
+
mermaid: {
|
|
485
|
+
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
486
|
+
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
declare module '@tiptap/core' {
|
|
493
|
+
interface Commands<ReturnType> {
|
|
494
|
+
drawer: {
|
|
495
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
496
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
495
497
|
};
|
|
496
498
|
}
|
|
497
499
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -10,7 +10,9 @@ import { RefAttributes } from 'react';
|
|
|
10
10
|
import { TooltipContentProps } from '@radix-ui/react-tooltip';
|
|
11
11
|
import { UseEditorOptions } from '@tiptap/react';
|
|
12
12
|
|
|
13
|
-
declare
|
|
13
|
+
export declare const ActionButton: default_2.ForwardRefExoticComponent<Partial<ActionButtonProps> & default_2.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
|
|
15
|
+
export declare interface ActionButtonProps {
|
|
14
16
|
icon?: string;
|
|
15
17
|
title?: string;
|
|
16
18
|
tooltip?: string;
|
|
@@ -306,24 +308,15 @@ declare module '@tiptap/core' {
|
|
|
306
308
|
|
|
307
309
|
declare module '@tiptap/core' {
|
|
308
310
|
interface Commands<ReturnType> {
|
|
309
|
-
|
|
310
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
311
|
-
unsetLineHeight: () => ReturnType;
|
|
312
|
-
};
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
declare module '@tiptap/core' {
|
|
318
|
-
interface Commands<ReturnType> {
|
|
319
|
-
iframe: {
|
|
311
|
+
indent: {
|
|
320
312
|
/**
|
|
321
|
-
*
|
|
313
|
+
* Set the indent attribute
|
|
322
314
|
*/
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
315
|
+
indent: () => ReturnType;
|
|
316
|
+
/**
|
|
317
|
+
* Set the outdent attribute
|
|
318
|
+
*/
|
|
319
|
+
outdent: () => ReturnType;
|
|
327
320
|
};
|
|
328
321
|
}
|
|
329
322
|
}
|
|
@@ -331,9 +324,13 @@ declare module '@tiptap/core' {
|
|
|
331
324
|
|
|
332
325
|
declare module '@tiptap/core' {
|
|
333
326
|
interface Commands<ReturnType> {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
327
|
+
columns: {
|
|
328
|
+
insertColumns: (attrs?: {
|
|
329
|
+
cols: number;
|
|
330
|
+
}) => ReturnType;
|
|
331
|
+
addColBefore: () => ReturnType;
|
|
332
|
+
addColAfter: () => ReturnType;
|
|
333
|
+
deleteCol: () => ReturnType;
|
|
337
334
|
};
|
|
338
335
|
}
|
|
339
336
|
}
|
|
@@ -341,19 +338,9 @@ declare module '@tiptap/core' {
|
|
|
341
338
|
|
|
342
339
|
declare module '@tiptap/core' {
|
|
343
340
|
interface Commands<ReturnType> {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
*/
|
|
348
|
-
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
349
|
-
/**
|
|
350
|
-
* Update an image
|
|
351
|
-
*/
|
|
352
|
-
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
353
|
-
/**
|
|
354
|
-
* Set image alignment
|
|
355
|
-
*/
|
|
356
|
-
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
341
|
+
lineHeight: {
|
|
342
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
343
|
+
unsetLineHeight: () => ReturnType;
|
|
357
344
|
};
|
|
358
345
|
}
|
|
359
346
|
}
|
|
@@ -361,8 +348,8 @@ declare module '@tiptap/core' {
|
|
|
361
348
|
|
|
362
349
|
declare module '@tiptap/core' {
|
|
363
350
|
interface Commands<ReturnType> {
|
|
364
|
-
|
|
365
|
-
|
|
351
|
+
painter: {
|
|
352
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
366
353
|
};
|
|
367
354
|
}
|
|
368
355
|
}
|
|
@@ -370,13 +357,14 @@ declare module '@tiptap/core' {
|
|
|
370
357
|
|
|
371
358
|
declare module '@tiptap/core' {
|
|
372
359
|
interface Commands<ReturnType> {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
360
|
+
search: {
|
|
361
|
+
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
362
|
+
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
363
|
+
replace: () => ReturnType;
|
|
364
|
+
replaceAll: () => ReturnType;
|
|
365
|
+
goToPrevSearchResult: () => void;
|
|
366
|
+
goToNextSearchResult: () => void;
|
|
367
|
+
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
380
368
|
};
|
|
381
369
|
}
|
|
382
370
|
}
|
|
@@ -384,15 +372,19 @@ declare module '@tiptap/core' {
|
|
|
384
372
|
|
|
385
373
|
declare module '@tiptap/core' {
|
|
386
374
|
interface Commands<ReturnType> {
|
|
387
|
-
|
|
375
|
+
imageUpload: {
|
|
388
376
|
/**
|
|
389
|
-
*
|
|
377
|
+
* Add an image
|
|
390
378
|
*/
|
|
391
|
-
|
|
379
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
392
380
|
/**
|
|
393
|
-
*
|
|
381
|
+
* Update an image
|
|
394
382
|
*/
|
|
395
|
-
|
|
383
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
384
|
+
/**
|
|
385
|
+
* Set image alignment
|
|
386
|
+
*/
|
|
387
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
396
388
|
};
|
|
397
389
|
}
|
|
398
390
|
}
|
|
@@ -400,8 +392,14 @@ declare module '@tiptap/core' {
|
|
|
400
392
|
|
|
401
393
|
declare module '@tiptap/core' {
|
|
402
394
|
interface Commands<ReturnType> {
|
|
403
|
-
|
|
404
|
-
|
|
395
|
+
iframe: {
|
|
396
|
+
/**
|
|
397
|
+
* Add an iframe
|
|
398
|
+
*/
|
|
399
|
+
setIframe: (options: {
|
|
400
|
+
src: string;
|
|
401
|
+
service: string;
|
|
402
|
+
}) => ReturnType;
|
|
405
403
|
};
|
|
406
404
|
}
|
|
407
405
|
}
|
|
@@ -421,8 +419,9 @@ declare module '@tiptap/core' {
|
|
|
421
419
|
|
|
422
420
|
declare module '@tiptap/core' {
|
|
423
421
|
interface Commands<ReturnType> {
|
|
424
|
-
|
|
425
|
-
|
|
422
|
+
tableCellBackground: {
|
|
423
|
+
setTableCellBackground: (color: string) => ReturnType;
|
|
424
|
+
unsetTableCellBackground: () => ReturnType;
|
|
426
425
|
};
|
|
427
426
|
}
|
|
428
427
|
}
|
|
@@ -430,14 +429,8 @@ declare module '@tiptap/core' {
|
|
|
430
429
|
|
|
431
430
|
declare module '@tiptap/core' {
|
|
432
431
|
interface Commands<ReturnType> {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
436
|
-
replace: () => ReturnType;
|
|
437
|
-
replaceAll: () => ReturnType;
|
|
438
|
-
goToPrevSearchResult: () => void;
|
|
439
|
-
goToNextSearchResult: () => void;
|
|
440
|
-
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
432
|
+
katex: {
|
|
433
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
441
434
|
};
|
|
442
435
|
}
|
|
443
436
|
}
|
|
@@ -455,9 +448,8 @@ declare module '@tiptap/core' {
|
|
|
455
448
|
|
|
456
449
|
declare module '@tiptap/core' {
|
|
457
450
|
interface Commands<ReturnType> {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
451
|
+
exportWord: {
|
|
452
|
+
exportToWord: () => ReturnType;
|
|
461
453
|
};
|
|
462
454
|
}
|
|
463
455
|
}
|
|
@@ -465,9 +457,8 @@ declare module '@tiptap/core' {
|
|
|
465
457
|
|
|
466
458
|
declare module '@tiptap/core' {
|
|
467
459
|
interface Commands<ReturnType> {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
460
|
+
attachment: {
|
|
461
|
+
setAttachment: (attrs?: unknown) => ReturnType;
|
|
471
462
|
};
|
|
472
463
|
}
|
|
473
464
|
}
|
|
@@ -490,8 +481,19 @@ declare module '@tiptap/core' {
|
|
|
490
481
|
|
|
491
482
|
declare module '@tiptap/core' {
|
|
492
483
|
interface Commands<ReturnType> {
|
|
493
|
-
|
|
494
|
-
|
|
484
|
+
mermaid: {
|
|
485
|
+
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
486
|
+
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
declare module '@tiptap/core' {
|
|
493
|
+
interface Commands<ReturnType> {
|
|
494
|
+
drawer: {
|
|
495
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
496
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
495
497
|
};
|
|
496
498
|
}
|
|
497
499
|
}
|