reactjs-tiptap-editor 0.2.21 → 0.2.22
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/{RichTextEditor-aaUynZc2.js → RichTextEditor-BnruDETn.js} +1576 -1550
- package/lib/RichTextEditor-CRJ-dSCW.cjs +141 -0
- package/lib/extension-bundle.cjs +1 -1
- package/lib/extension-bundle.d.cts +45 -45
- package/lib/extension-bundle.d.ts +45 -45
- package/lib/extension-bundle.js +2 -2
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +92 -52
- package/lib/index.d.ts +92 -52
- package/lib/index.js +1 -1
- package/lib/locale-bundle.d.cts +45 -45
- package/lib/locale-bundle.d.ts +45 -45
- package/package.json +1 -1
- package/lib/RichTextEditor-DAqU7JiB.cjs +0 -141
package/lib/index.d.ts
CHANGED
|
@@ -1,13 +1,44 @@
|
|
|
1
1
|
import { AnyExtension } from '@tiptap/core';
|
|
2
2
|
import { BubbleMenu } from '@tiptap/react';
|
|
3
|
+
import { default as default_2 } from 'react';
|
|
3
4
|
import { Editor } from '@tiptap/react';
|
|
4
5
|
import { Editor as Editor_2 } from '@tiptap/core';
|
|
5
6
|
import { ForwardRefExoticComponent } from 'react';
|
|
6
7
|
import { RefAttributes } from 'react';
|
|
8
|
+
import { TooltipContentProps } from '@radix-ui/react-tooltip';
|
|
7
9
|
import { UseEditorOptions } from '@tiptap/react';
|
|
8
10
|
|
|
11
|
+
declare interface ActionButtonProps {
|
|
12
|
+
icon?: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
tooltip?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
shortcutKeys?: string[];
|
|
17
|
+
customClass?: string;
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
tooltipOptions?: TooltipContentProps;
|
|
20
|
+
color?: string;
|
|
21
|
+
action?: ButtonViewReturnComponentProps['action'];
|
|
22
|
+
isActive?: ButtonViewReturnComponentProps['isActive'];
|
|
23
|
+
children?: default_2.ReactNode;
|
|
24
|
+
asChild?: boolean;
|
|
25
|
+
upload?: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
9
28
|
export { BubbleMenu }
|
|
10
29
|
|
|
30
|
+
declare interface BubbleMenuConfig {
|
|
31
|
+
/**
|
|
32
|
+
* @description Column menu hidden
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
hidden?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* custom menu actions
|
|
38
|
+
*/
|
|
39
|
+
actions?: ActionButtonProps[];
|
|
40
|
+
}
|
|
41
|
+
|
|
11
42
|
/**
|
|
12
43
|
* Represents the BubbleMenuProps.
|
|
13
44
|
*/
|
|
@@ -19,13 +50,7 @@ declare interface BubbleMenuProps {
|
|
|
19
50
|
*/
|
|
20
51
|
hidden?: boolean;
|
|
21
52
|
};
|
|
22
|
-
tableConfig?:
|
|
23
|
-
/**
|
|
24
|
-
* @description Table menu hidden
|
|
25
|
-
* @default false
|
|
26
|
-
*/
|
|
27
|
-
hidden?: boolean;
|
|
28
|
-
};
|
|
53
|
+
tableConfig?: BubbleMenuConfig;
|
|
29
54
|
floatingMenuConfig?: {
|
|
30
55
|
/**
|
|
31
56
|
* @description Floating menu hidden
|
|
@@ -122,6 +147,21 @@ declare interface BubbleMenuRenderProps {
|
|
|
122
147
|
bubbleMenu: BubbleMenuProps;
|
|
123
148
|
}
|
|
124
149
|
|
|
150
|
+
/**
|
|
151
|
+
* Represents the props for the ButtonView component.
|
|
152
|
+
*/
|
|
153
|
+
declare interface ButtonViewReturnComponentProps {
|
|
154
|
+
/** Method triggered when action is performed */
|
|
155
|
+
action?: (value?: any) => void;
|
|
156
|
+
/** Whether it is in the active state */
|
|
157
|
+
isActive?: () => boolean;
|
|
158
|
+
/** Button icon */
|
|
159
|
+
icon?: any;
|
|
160
|
+
/** Text displayed on hover */
|
|
161
|
+
tooltip?: string;
|
|
162
|
+
[x: string]: any;
|
|
163
|
+
}
|
|
164
|
+
|
|
125
165
|
declare const _default: ForwardRefExoticComponent<RichTextEditorProps & RefAttributes< {
|
|
126
166
|
editor: Editor_2 | null;
|
|
127
167
|
}>>;
|
|
@@ -265,21 +305,6 @@ declare module '@tiptap/core' {
|
|
|
265
305
|
}
|
|
266
306
|
|
|
267
307
|
|
|
268
|
-
declare module '@tiptap/core' {
|
|
269
|
-
interface Commands<ReturnType> {
|
|
270
|
-
iframe: {
|
|
271
|
-
/**
|
|
272
|
-
* Add an iframe
|
|
273
|
-
*/
|
|
274
|
-
setIframe: (options: {
|
|
275
|
-
src: string;
|
|
276
|
-
service: string;
|
|
277
|
-
}) => ReturnType;
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
|
|
283
308
|
declare module '@tiptap/core' {
|
|
284
309
|
interface Commands<ReturnType> {
|
|
285
310
|
lineHeight: {
|
|
@@ -331,14 +356,13 @@ declare module '@tiptap/core' {
|
|
|
331
356
|
|
|
332
357
|
declare module '@tiptap/core' {
|
|
333
358
|
interface Commands<ReturnType> {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
359
|
+
columns: {
|
|
360
|
+
insertColumns: (attrs?: {
|
|
361
|
+
cols: number;
|
|
362
|
+
}) => ReturnType;
|
|
363
|
+
addColBefore: () => ReturnType;
|
|
364
|
+
addColAfter: () => ReturnType;
|
|
365
|
+
deleteCol: () => ReturnType;
|
|
342
366
|
};
|
|
343
367
|
}
|
|
344
368
|
}
|
|
@@ -346,10 +370,13 @@ declare module '@tiptap/core' {
|
|
|
346
370
|
|
|
347
371
|
declare module '@tiptap/core' {
|
|
348
372
|
interface Commands<ReturnType> {
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
373
|
+
iframe: {
|
|
374
|
+
/**
|
|
375
|
+
* Add an iframe
|
|
376
|
+
*/
|
|
377
|
+
setIframe: (options: {
|
|
378
|
+
src: string;
|
|
379
|
+
service: string;
|
|
353
380
|
}) => ReturnType;
|
|
354
381
|
};
|
|
355
382
|
}
|
|
@@ -358,13 +385,20 @@ declare module '@tiptap/core' {
|
|
|
358
385
|
|
|
359
386
|
declare module '@tiptap/core' {
|
|
360
387
|
interface Commands<ReturnType> {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
388
|
+
katex: {
|
|
389
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
declare module '@tiptap/core' {
|
|
396
|
+
interface Commands<ReturnType> {
|
|
397
|
+
emoji: {
|
|
398
|
+
setEmoji: (emoji: {
|
|
399
|
+
name: string;
|
|
400
|
+
emoji: string;
|
|
364
401
|
}) => ReturnType;
|
|
365
|
-
addColBefore: () => ReturnType;
|
|
366
|
-
addColAfter: () => ReturnType;
|
|
367
|
-
deleteCol: () => ReturnType;
|
|
368
402
|
};
|
|
369
403
|
}
|
|
370
404
|
}
|
|
@@ -372,8 +406,14 @@ declare module '@tiptap/core' {
|
|
|
372
406
|
|
|
373
407
|
declare module '@tiptap/core' {
|
|
374
408
|
interface Commands<ReturnType> {
|
|
375
|
-
|
|
376
|
-
|
|
409
|
+
search: {
|
|
410
|
+
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
411
|
+
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
412
|
+
replace: () => ReturnType;
|
|
413
|
+
replaceAll: () => ReturnType;
|
|
414
|
+
goToPrevSearchResult: () => void;
|
|
415
|
+
goToNextSearchResult: () => void;
|
|
416
|
+
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
377
417
|
};
|
|
378
418
|
}
|
|
379
419
|
}
|
|
@@ -416,6 +456,16 @@ declare module '@tiptap/core' {
|
|
|
416
456
|
}
|
|
417
457
|
|
|
418
458
|
|
|
459
|
+
declare module '@tiptap/core' {
|
|
460
|
+
interface Commands<ReturnType> {
|
|
461
|
+
mermaid: {
|
|
462
|
+
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
463
|
+
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
|
|
419
469
|
declare module '@tiptap/core' {
|
|
420
470
|
interface Commands<ReturnType> {
|
|
421
471
|
imageGifUpload: {
|
|
@@ -459,13 +509,3 @@ declare module '@tiptap/core' {
|
|
|
459
509
|
};
|
|
460
510
|
}
|
|
461
511
|
}
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
declare module '@tiptap/core' {
|
|
465
|
-
interface Commands<ReturnType> {
|
|
466
|
-
mermaid: {
|
|
467
|
-
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
468
|
-
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
469
|
-
};
|
|
470
|
-
}
|
|
471
|
-
}
|
package/lib/index.js
CHANGED
package/lib/locale-bundle.d.cts
CHANGED
|
@@ -934,21 +934,6 @@ declare module '@tiptap/core' {
|
|
|
934
934
|
}
|
|
935
935
|
|
|
936
936
|
|
|
937
|
-
declare module '@tiptap/core' {
|
|
938
|
-
interface Commands<ReturnType> {
|
|
939
|
-
iframe: {
|
|
940
|
-
/**
|
|
941
|
-
* Add an iframe
|
|
942
|
-
*/
|
|
943
|
-
setIframe: (options: {
|
|
944
|
-
src: string;
|
|
945
|
-
service: string;
|
|
946
|
-
}) => ReturnType;
|
|
947
|
-
};
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
|
|
952
937
|
declare module '@tiptap/core' {
|
|
953
938
|
interface Commands<ReturnType> {
|
|
954
939
|
lineHeight: {
|
|
@@ -1000,14 +985,13 @@ declare module '@tiptap/core' {
|
|
|
1000
985
|
|
|
1001
986
|
declare module '@tiptap/core' {
|
|
1002
987
|
interface Commands<ReturnType> {
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
988
|
+
columns: {
|
|
989
|
+
insertColumns: (attrs?: {
|
|
990
|
+
cols: number;
|
|
991
|
+
}) => ReturnType;
|
|
992
|
+
addColBefore: () => ReturnType;
|
|
993
|
+
addColAfter: () => ReturnType;
|
|
994
|
+
deleteCol: () => ReturnType;
|
|
1011
995
|
};
|
|
1012
996
|
}
|
|
1013
997
|
}
|
|
@@ -1015,10 +999,13 @@ declare module '@tiptap/core' {
|
|
|
1015
999
|
|
|
1016
1000
|
declare module '@tiptap/core' {
|
|
1017
1001
|
interface Commands<ReturnType> {
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1002
|
+
iframe: {
|
|
1003
|
+
/**
|
|
1004
|
+
* Add an iframe
|
|
1005
|
+
*/
|
|
1006
|
+
setIframe: (options: {
|
|
1007
|
+
src: string;
|
|
1008
|
+
service: string;
|
|
1022
1009
|
}) => ReturnType;
|
|
1023
1010
|
};
|
|
1024
1011
|
}
|
|
@@ -1027,13 +1014,20 @@ declare module '@tiptap/core' {
|
|
|
1027
1014
|
|
|
1028
1015
|
declare module '@tiptap/core' {
|
|
1029
1016
|
interface Commands<ReturnType> {
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1017
|
+
katex: {
|
|
1018
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
1019
|
+
};
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
|
|
1024
|
+
declare module '@tiptap/core' {
|
|
1025
|
+
interface Commands<ReturnType> {
|
|
1026
|
+
emoji: {
|
|
1027
|
+
setEmoji: (emoji: {
|
|
1028
|
+
name: string;
|
|
1029
|
+
emoji: string;
|
|
1033
1030
|
}) => ReturnType;
|
|
1034
|
-
addColBefore: () => ReturnType;
|
|
1035
|
-
addColAfter: () => ReturnType;
|
|
1036
|
-
deleteCol: () => ReturnType;
|
|
1037
1031
|
};
|
|
1038
1032
|
}
|
|
1039
1033
|
}
|
|
@@ -1041,8 +1035,14 @@ declare module '@tiptap/core' {
|
|
|
1041
1035
|
|
|
1042
1036
|
declare module '@tiptap/core' {
|
|
1043
1037
|
interface Commands<ReturnType> {
|
|
1044
|
-
|
|
1045
|
-
|
|
1038
|
+
search: {
|
|
1039
|
+
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
1040
|
+
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
1041
|
+
replace: () => ReturnType;
|
|
1042
|
+
replaceAll: () => ReturnType;
|
|
1043
|
+
goToPrevSearchResult: () => void;
|
|
1044
|
+
goToNextSearchResult: () => void;
|
|
1045
|
+
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
1046
1046
|
};
|
|
1047
1047
|
}
|
|
1048
1048
|
}
|
|
@@ -1085,6 +1085,16 @@ declare module '@tiptap/core' {
|
|
|
1085
1085
|
}
|
|
1086
1086
|
|
|
1087
1087
|
|
|
1088
|
+
declare module '@tiptap/core' {
|
|
1089
|
+
interface Commands<ReturnType> {
|
|
1090
|
+
mermaid: {
|
|
1091
|
+
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
1092
|
+
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
1093
|
+
};
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
|
|
1088
1098
|
declare module '@tiptap/core' {
|
|
1089
1099
|
interface Commands<ReturnType> {
|
|
1090
1100
|
imageGifUpload: {
|
|
@@ -1128,13 +1138,3 @@ declare module '@tiptap/core' {
|
|
|
1128
1138
|
};
|
|
1129
1139
|
}
|
|
1130
1140
|
}
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
declare module '@tiptap/core' {
|
|
1134
|
-
interface Commands<ReturnType> {
|
|
1135
|
-
mermaid: {
|
|
1136
|
-
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
1137
|
-
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
1138
|
-
};
|
|
1139
|
-
}
|
|
1140
|
-
}
|
package/lib/locale-bundle.d.ts
CHANGED
|
@@ -934,21 +934,6 @@ declare module '@tiptap/core' {
|
|
|
934
934
|
}
|
|
935
935
|
|
|
936
936
|
|
|
937
|
-
declare module '@tiptap/core' {
|
|
938
|
-
interface Commands<ReturnType> {
|
|
939
|
-
iframe: {
|
|
940
|
-
/**
|
|
941
|
-
* Add an iframe
|
|
942
|
-
*/
|
|
943
|
-
setIframe: (options: {
|
|
944
|
-
src: string;
|
|
945
|
-
service: string;
|
|
946
|
-
}) => ReturnType;
|
|
947
|
-
};
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
|
|
952
937
|
declare module '@tiptap/core' {
|
|
953
938
|
interface Commands<ReturnType> {
|
|
954
939
|
lineHeight: {
|
|
@@ -1000,14 +985,13 @@ declare module '@tiptap/core' {
|
|
|
1000
985
|
|
|
1001
986
|
declare module '@tiptap/core' {
|
|
1002
987
|
interface Commands<ReturnType> {
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
988
|
+
columns: {
|
|
989
|
+
insertColumns: (attrs?: {
|
|
990
|
+
cols: number;
|
|
991
|
+
}) => ReturnType;
|
|
992
|
+
addColBefore: () => ReturnType;
|
|
993
|
+
addColAfter: () => ReturnType;
|
|
994
|
+
deleteCol: () => ReturnType;
|
|
1011
995
|
};
|
|
1012
996
|
}
|
|
1013
997
|
}
|
|
@@ -1015,10 +999,13 @@ declare module '@tiptap/core' {
|
|
|
1015
999
|
|
|
1016
1000
|
declare module '@tiptap/core' {
|
|
1017
1001
|
interface Commands<ReturnType> {
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1002
|
+
iframe: {
|
|
1003
|
+
/**
|
|
1004
|
+
* Add an iframe
|
|
1005
|
+
*/
|
|
1006
|
+
setIframe: (options: {
|
|
1007
|
+
src: string;
|
|
1008
|
+
service: string;
|
|
1022
1009
|
}) => ReturnType;
|
|
1023
1010
|
};
|
|
1024
1011
|
}
|
|
@@ -1027,13 +1014,20 @@ declare module '@tiptap/core' {
|
|
|
1027
1014
|
|
|
1028
1015
|
declare module '@tiptap/core' {
|
|
1029
1016
|
interface Commands<ReturnType> {
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1017
|
+
katex: {
|
|
1018
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
1019
|
+
};
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
|
|
1024
|
+
declare module '@tiptap/core' {
|
|
1025
|
+
interface Commands<ReturnType> {
|
|
1026
|
+
emoji: {
|
|
1027
|
+
setEmoji: (emoji: {
|
|
1028
|
+
name: string;
|
|
1029
|
+
emoji: string;
|
|
1033
1030
|
}) => ReturnType;
|
|
1034
|
-
addColBefore: () => ReturnType;
|
|
1035
|
-
addColAfter: () => ReturnType;
|
|
1036
|
-
deleteCol: () => ReturnType;
|
|
1037
1031
|
};
|
|
1038
1032
|
}
|
|
1039
1033
|
}
|
|
@@ -1041,8 +1035,14 @@ declare module '@tiptap/core' {
|
|
|
1041
1035
|
|
|
1042
1036
|
declare module '@tiptap/core' {
|
|
1043
1037
|
interface Commands<ReturnType> {
|
|
1044
|
-
|
|
1045
|
-
|
|
1038
|
+
search: {
|
|
1039
|
+
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
1040
|
+
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
1041
|
+
replace: () => ReturnType;
|
|
1042
|
+
replaceAll: () => ReturnType;
|
|
1043
|
+
goToPrevSearchResult: () => void;
|
|
1044
|
+
goToNextSearchResult: () => void;
|
|
1045
|
+
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
1046
1046
|
};
|
|
1047
1047
|
}
|
|
1048
1048
|
}
|
|
@@ -1085,6 +1085,16 @@ declare module '@tiptap/core' {
|
|
|
1085
1085
|
}
|
|
1086
1086
|
|
|
1087
1087
|
|
|
1088
|
+
declare module '@tiptap/core' {
|
|
1089
|
+
interface Commands<ReturnType> {
|
|
1090
|
+
mermaid: {
|
|
1091
|
+
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
1092
|
+
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
1093
|
+
};
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
|
|
1088
1098
|
declare module '@tiptap/core' {
|
|
1089
1099
|
interface Commands<ReturnType> {
|
|
1090
1100
|
imageGifUpload: {
|
|
@@ -1128,13 +1138,3 @@ declare module '@tiptap/core' {
|
|
|
1128
1138
|
};
|
|
1129
1139
|
}
|
|
1130
1140
|
}
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
declare module '@tiptap/core' {
|
|
1134
|
-
interface Commands<ReturnType> {
|
|
1135
|
-
mermaid: {
|
|
1136
|
-
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
1137
|
-
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
1138
|
-
};
|
|
1139
|
-
}
|
|
1140
|
-
}
|
package/package.json
CHANGED