reactjs-tiptap-editor 0.0.30 → 0.0.32
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 +109 -79
- package/lib/index.d.ts +109 -79
- package/lib/locales-CNDUZakH.cjs +1 -0
- package/lib/{locales-D767TIQP.js → locales-RKFY1Hr_.js} +143 -132
- package/lib/reactjs-tiptap-editor.cjs +1 -1
- package/lib/reactjs-tiptap-editor.js +32 -31
- package/lib/style.css +1 -1
- package/lib/{tiptap-Dr2jJgw-.cjs → tiptap-Bskeq9lj.cjs} +12 -12
- package/lib/{tiptap-CK44C-2f.js → tiptap-CBhddmxi.js} +389 -379
- package/lib/{utils-DrrJak96.js → utils-B-vBjKHn.js} +3052 -2555
- package/lib/utils-DoNOKFuh.cjs +135 -0
- package/lib/{vendor-D533qV8r.js → vendor-CnblLvXI.js} +4288 -3922
- package/lib/vendor-xLJPanGi.cjs +17 -0
- package/package.json +6 -1
- package/lib/locales-CIjswkre.cjs +0 -1
- package/lib/utils-DW_zDPZv.cjs +0 -135
- package/lib/vendor-JmPfJfTA.cjs +0 -17
package/lib/index.d.cts
CHANGED
|
@@ -25,8 +25,8 @@ import { ItalicOptions as ItalicOptions_2 } from '@tiptap/extension-italic';
|
|
|
25
25
|
import { LinkOptions as LinkOptions_2 } from '@tiptap/extension-link';
|
|
26
26
|
import { ListItemOptions } from '@tiptap/extension-list-item';
|
|
27
27
|
import { Mark } from '@tiptap/core';
|
|
28
|
-
import { Node as Node_2 } from '@tiptap/
|
|
29
|
-
import { Node as Node_3 } from '@tiptap/
|
|
28
|
+
import { Node as Node_2 } from '@tiptap/react';
|
|
29
|
+
import { Node as Node_3 } from '@tiptap/core';
|
|
30
30
|
import { OrderedListOptions as OrderedListOptions_2 } from '@tiptap/extension-ordered-list';
|
|
31
31
|
import { ParagraphOptions } from '@tiptap/extension-paragraph';
|
|
32
32
|
import { PlaceholderOptions } from '@tiptap/extension-placeholder';
|
|
@@ -153,7 +153,7 @@ export declare interface BaseKitOptions {
|
|
|
153
153
|
selection: any | false;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
export declare const Blockquote:
|
|
156
|
+
export declare const Blockquote: Node_3<BlockquoteOptions, any>;
|
|
157
157
|
|
|
158
158
|
export declare interface BlockquoteOptions extends BlockquoteOptions_2, GeneralOptions<BlockquoteOptions> {
|
|
159
159
|
}
|
|
@@ -223,6 +223,13 @@ declare interface BubbleMenuProps {
|
|
|
223
223
|
*/
|
|
224
224
|
hidden?: boolean;
|
|
225
225
|
};
|
|
226
|
+
excalidrawConfig?: {
|
|
227
|
+
/**
|
|
228
|
+
* @description excalidraw menu hidden
|
|
229
|
+
* @default false
|
|
230
|
+
*/
|
|
231
|
+
hidden?: boolean;
|
|
232
|
+
};
|
|
226
233
|
render?: (props: BubbleMenuRenderProps, dom: React.ReactNode) => React.ReactNode;
|
|
227
234
|
}
|
|
228
235
|
|
|
@@ -235,7 +242,7 @@ declare interface BubbleMenuRenderProps {
|
|
|
235
242
|
bubbleMenu: BubbleMenuProps;
|
|
236
243
|
}
|
|
237
244
|
|
|
238
|
-
export declare const BulletList:
|
|
245
|
+
export declare const BulletList: Node_3<BulletListOptions, any>;
|
|
239
246
|
|
|
240
247
|
export declare interface BulletListOptions extends BulletListOptions_2, GeneralOptions<BulletListOptions> {
|
|
241
248
|
}
|
|
@@ -295,7 +302,7 @@ declare interface ButtonViewReturnComponentSlots {
|
|
|
295
302
|
[x: string]: () => any;
|
|
296
303
|
}
|
|
297
304
|
|
|
298
|
-
export declare const Clear:
|
|
305
|
+
export declare const Clear: Node_3<ClearOptions, any>;
|
|
299
306
|
|
|
300
307
|
export declare interface ClearOptions extends GeneralOptions<ClearOptions> {
|
|
301
308
|
}
|
|
@@ -325,7 +332,7 @@ export declare interface ColorOptions extends ColorOptions_2, GeneralOptions<Col
|
|
|
325
332
|
defaultColor?: string;
|
|
326
333
|
}
|
|
327
334
|
|
|
328
|
-
export declare const Column:
|
|
335
|
+
export declare const Column: Node_3<any, any>;
|
|
329
336
|
|
|
330
337
|
export declare const ColumnActionButton: Extension<any, any>;
|
|
331
338
|
|
|
@@ -334,7 +341,7 @@ editor: Editor_2 | null;
|
|
|
334
341
|
}>>;
|
|
335
342
|
export default _default;
|
|
336
343
|
|
|
337
|
-
export declare const Emoji:
|
|
344
|
+
export declare const Emoji: Node_3<any, any>;
|
|
338
345
|
|
|
339
346
|
export declare const en: {
|
|
340
347
|
'editor.remove': string;
|
|
@@ -345,6 +352,9 @@ export declare const en: {
|
|
|
345
352
|
'editor.recent': string;
|
|
346
353
|
'editor.nofill': string;
|
|
347
354
|
'editor.format': string;
|
|
355
|
+
'editor.delete': string;
|
|
356
|
+
'editor.edit': string;
|
|
357
|
+
'editor.settings': string;
|
|
348
358
|
'editor.table_of_content': string;
|
|
349
359
|
'editor.draghandle.tooltip': string;
|
|
350
360
|
'editor.copyToClipboard': string;
|
|
@@ -485,6 +495,8 @@ export declare const en: {
|
|
|
485
495
|
'editor.importWrod.tooltip': string;
|
|
486
496
|
};
|
|
487
497
|
|
|
498
|
+
export declare const Excalidraw: Node_3<any, any>;
|
|
499
|
+
|
|
488
500
|
export declare const ExportPdf: Extension<any, any>;
|
|
489
501
|
|
|
490
502
|
export declare const ExportWord: Extension<ExportWordOptions, any>;
|
|
@@ -541,7 +553,7 @@ declare interface GeneralOptions<T> {
|
|
|
541
553
|
toolbar?: boolean;
|
|
542
554
|
}
|
|
543
555
|
|
|
544
|
-
export declare const Heading:
|
|
556
|
+
export declare const Heading: Node_3<HeadingOptions, any>;
|
|
545
557
|
|
|
546
558
|
export declare interface HeadingOptions extends HeadingOptions_2, GeneralOptions<HeadingOptions> {
|
|
547
559
|
}
|
|
@@ -558,28 +570,21 @@ export { History_2 as History }
|
|
|
558
570
|
export declare interface HistoryOptions extends HistoryOptions_2, GeneralOptions<HistoryOptions> {
|
|
559
571
|
}
|
|
560
572
|
|
|
561
|
-
export declare const HorizontalRule:
|
|
573
|
+
export declare const HorizontalRule: Node_3<HorizontalRuleOptions, any>;
|
|
562
574
|
|
|
563
575
|
export declare interface HorizontalRuleOptions extends HorizontalRuleOptions_2, GeneralOptions<HorizontalRuleOptions> {
|
|
564
576
|
}
|
|
565
577
|
|
|
566
|
-
export declare const Iframe:
|
|
567
|
-
|
|
568
|
-
declare interface IframeOptions extends GeneralOptions<IframeOptions> {
|
|
569
|
-
allowFullscreen: boolean;
|
|
570
|
-
HTMLAttributes: {
|
|
571
|
-
[key: string]: any;
|
|
572
|
-
};
|
|
573
|
-
}
|
|
578
|
+
export declare const Iframe: Node_3<any, any>;
|
|
574
579
|
|
|
575
580
|
declare interface IKatexOptions {
|
|
576
581
|
HTMLAttributes: Record<string, any>;
|
|
577
582
|
}
|
|
578
583
|
|
|
579
|
-
declare const Image_2:
|
|
584
|
+
declare const Image_2: Node_3<ImageOptions, any>;
|
|
580
585
|
export { Image_2 as Image }
|
|
581
586
|
|
|
582
|
-
export declare const ImageUpload:
|
|
587
|
+
export declare const ImageUpload: Node_2<ImageUploadOptions, any>;
|
|
583
588
|
|
|
584
589
|
export declare interface ImageUploadOptions {
|
|
585
590
|
upload: (file: File) => Promise<string>;
|
|
@@ -611,7 +616,7 @@ export declare const Italic: Mark<ItalicOptions, any>;
|
|
|
611
616
|
export declare interface ItalicOptions extends ItalicOptions_2, GeneralOptions<ItalicOptions> {
|
|
612
617
|
}
|
|
613
618
|
|
|
614
|
-
export declare const Katex:
|
|
619
|
+
export declare const Katex: Node_3<IKatexOptions, any>;
|
|
615
620
|
|
|
616
621
|
declare type LanguageType = 'en' | 'vi' | 'zh_CN' | string;
|
|
617
622
|
|
|
@@ -666,7 +671,7 @@ export declare interface MoreMarkOptions extends GeneralOptions<MoreMarkOptions>
|
|
|
666
671
|
superscript: Partial<SuperscriptExtensionOptions> | false;
|
|
667
672
|
}
|
|
668
673
|
|
|
669
|
-
export declare const MultiColumn:
|
|
674
|
+
export declare const MultiColumn: Node_3<any, any>;
|
|
670
675
|
|
|
671
676
|
declare interface NameValueOption<T = string> {
|
|
672
677
|
name: string;
|
|
@@ -677,7 +682,7 @@ declare interface Options {
|
|
|
677
682
|
onHasOneBeforeInsert?: () => void;
|
|
678
683
|
}
|
|
679
684
|
|
|
680
|
-
export declare const OrderedList:
|
|
685
|
+
export declare const OrderedList: Node_3<OrderedListOptions, any>;
|
|
681
686
|
|
|
682
687
|
export declare interface OrderedListOptions extends OrderedListOptions_2, GeneralOptions<OrderedListOptions> {
|
|
683
688
|
}
|
|
@@ -789,14 +794,14 @@ export declare interface SubAndSuperScriptOptions extends GeneralOptions<SubAndS
|
|
|
789
794
|
superscript: Partial<SuperscriptExtensionOptions> | false;
|
|
790
795
|
}
|
|
791
796
|
|
|
792
|
-
export declare const Table:
|
|
797
|
+
export declare const Table: Node_3<TableOptions, any>;
|
|
793
798
|
|
|
794
799
|
declare interface TableCellBackgroundOptions {
|
|
795
800
|
HTMLAttributes: Record<string, any>;
|
|
796
801
|
types?: any;
|
|
797
802
|
}
|
|
798
803
|
|
|
799
|
-
export declare const TableOfContents:
|
|
804
|
+
export declare const TableOfContents: Node_3<Options, any>;
|
|
800
805
|
|
|
801
806
|
export declare interface TableOptions extends GeneralOptions<TableOptions> {
|
|
802
807
|
HTMLAttributes: Record<string, any>;
|
|
@@ -815,7 +820,7 @@ export declare interface TableOptions extends GeneralOptions<TableOptions> {
|
|
|
815
820
|
tableCellBackground: Partial<TableCellBackgroundOptions>;
|
|
816
821
|
}
|
|
817
822
|
|
|
818
|
-
export declare const TaskList:
|
|
823
|
+
export declare const TaskList: Node_3<TaskListOptions, any>;
|
|
819
824
|
|
|
820
825
|
/**
|
|
821
826
|
* Represents the interface for task list options, extending TiptapTaskListOptions and GeneralOptions.
|
|
@@ -866,6 +871,9 @@ export declare const vi: {
|
|
|
866
871
|
'editor.recent': string;
|
|
867
872
|
'editor.nofill': string;
|
|
868
873
|
'editor.format': string;
|
|
874
|
+
'editor.delete': string;
|
|
875
|
+
'editor.edit': string;
|
|
876
|
+
'editor.settings': string;
|
|
869
877
|
'editor.table_of_content': string;
|
|
870
878
|
'editor.draghandle.tooltip': string;
|
|
871
879
|
'editor.copyToClipboard': string;
|
|
@@ -1006,7 +1014,7 @@ export declare const vi: {
|
|
|
1006
1014
|
'editor.importWrod.tooltip': string;
|
|
1007
1015
|
};
|
|
1008
1016
|
|
|
1009
|
-
export declare const Video:
|
|
1017
|
+
export declare const Video: Node_3<VideoOptions, any>;
|
|
1010
1018
|
|
|
1011
1019
|
/**
|
|
1012
1020
|
* Represents the interface for video options, extending GeneralOptions.
|
|
@@ -1041,7 +1049,7 @@ declare interface VideoOptions_2 {
|
|
|
1041
1049
|
upload?: (files: File[]) => void;
|
|
1042
1050
|
}
|
|
1043
1051
|
|
|
1044
|
-
export declare const VideoUpload:
|
|
1052
|
+
export declare const VideoUpload: Node_3<VideoOptions_2, any>;
|
|
1045
1053
|
|
|
1046
1054
|
export declare const zh_CN: {
|
|
1047
1055
|
'editor.remove': string;
|
|
@@ -1052,6 +1060,9 @@ export declare const zh_CN: {
|
|
|
1052
1060
|
'editor.recent': string;
|
|
1053
1061
|
'editor.nofill': string;
|
|
1054
1062
|
'editor.format': string;
|
|
1063
|
+
'editor.delete': string;
|
|
1064
|
+
'editor.edit': string;
|
|
1065
|
+
'editor.settings': string;
|
|
1055
1066
|
'editor.table_of_content': string;
|
|
1056
1067
|
'editor.draghandle.tooltip': string;
|
|
1057
1068
|
'editor.copyToClipboard': string;
|
|
@@ -1231,15 +1242,9 @@ declare module '@tiptap/core' {
|
|
|
1231
1242
|
|
|
1232
1243
|
declare module '@tiptap/core' {
|
|
1233
1244
|
interface Commands<ReturnType> {
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
*/
|
|
1238
|
-
indent: () => ReturnType;
|
|
1239
|
-
/**
|
|
1240
|
-
* Set the outdent attribute
|
|
1241
|
-
*/
|
|
1242
|
-
outdent: () => ReturnType;
|
|
1245
|
+
tableCellBackground: {
|
|
1246
|
+
setTableCellBackground: (color: string) => ReturnType;
|
|
1247
|
+
unsetTableCellBackground: () => ReturnType;
|
|
1243
1248
|
};
|
|
1244
1249
|
}
|
|
1245
1250
|
}
|
|
@@ -1247,8 +1252,9 @@ declare module '@tiptap/core' {
|
|
|
1247
1252
|
|
|
1248
1253
|
declare module '@tiptap/core' {
|
|
1249
1254
|
interface Commands<ReturnType> {
|
|
1250
|
-
|
|
1251
|
-
|
|
1255
|
+
lineHeight: {
|
|
1256
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
1257
|
+
unsetLineHeight: () => ReturnType;
|
|
1252
1258
|
};
|
|
1253
1259
|
}
|
|
1254
1260
|
}
|
|
@@ -1256,8 +1262,8 @@ declare module '@tiptap/core' {
|
|
|
1256
1262
|
|
|
1257
1263
|
declare module '@tiptap/core' {
|
|
1258
1264
|
interface Commands<ReturnType> {
|
|
1259
|
-
|
|
1260
|
-
|
|
1265
|
+
painter: {
|
|
1266
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
1261
1267
|
};
|
|
1262
1268
|
}
|
|
1263
1269
|
}
|
|
@@ -1265,9 +1271,8 @@ declare module '@tiptap/core' {
|
|
|
1265
1271
|
|
|
1266
1272
|
declare module '@tiptap/core' {
|
|
1267
1273
|
interface Commands<ReturnType> {
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
unsetLineHeight: () => ReturnType;
|
|
1274
|
+
imageUpload: {
|
|
1275
|
+
setImageUpload: () => ReturnType;
|
|
1271
1276
|
};
|
|
1272
1277
|
}
|
|
1273
1278
|
}
|
|
@@ -1275,15 +1280,15 @@ declare module '@tiptap/core' {
|
|
|
1275
1280
|
|
|
1276
1281
|
declare module '@tiptap/core' {
|
|
1277
1282
|
interface Commands<ReturnType> {
|
|
1278
|
-
|
|
1283
|
+
indent: {
|
|
1279
1284
|
/**
|
|
1280
|
-
*
|
|
1285
|
+
* Set the indent attribute
|
|
1281
1286
|
*/
|
|
1282
|
-
|
|
1287
|
+
indent: () => ReturnType;
|
|
1283
1288
|
/**
|
|
1284
|
-
*
|
|
1289
|
+
* Set the outdent attribute
|
|
1285
1290
|
*/
|
|
1286
|
-
|
|
1291
|
+
outdent: () => ReturnType;
|
|
1287
1292
|
};
|
|
1288
1293
|
}
|
|
1289
1294
|
}
|
|
@@ -1291,14 +1296,13 @@ declare module '@tiptap/core' {
|
|
|
1291
1296
|
|
|
1292
1297
|
declare module '@tiptap/core' {
|
|
1293
1298
|
interface Commands<ReturnType> {
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
*/
|
|
1298
|
-
setIframe: (options: {
|
|
1299
|
-
src: string;
|
|
1300
|
-
service: string;
|
|
1299
|
+
columns: {
|
|
1300
|
+
insertColumns: (attrs?: {
|
|
1301
|
+
cols: number;
|
|
1301
1302
|
}) => ReturnType;
|
|
1303
|
+
addColBefore: () => ReturnType;
|
|
1304
|
+
addColAfter: () => ReturnType;
|
|
1305
|
+
deleteCol: () => ReturnType;
|
|
1302
1306
|
};
|
|
1303
1307
|
}
|
|
1304
1308
|
}
|
|
@@ -1306,22 +1310,15 @@ declare module '@tiptap/core' {
|
|
|
1306
1310
|
|
|
1307
1311
|
declare module '@tiptap/core' {
|
|
1308
1312
|
interface Commands<ReturnType> {
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
columns: {
|
|
1319
|
-
insertColumns: (attrs?: {
|
|
1320
|
-
cols: number;
|
|
1321
|
-
}) => ReturnType;
|
|
1322
|
-
addColBefore: () => ReturnType;
|
|
1323
|
-
addColAfter: () => ReturnType;
|
|
1324
|
-
deleteCol: () => ReturnType;
|
|
1313
|
+
imageResize: {
|
|
1314
|
+
/**
|
|
1315
|
+
* Add an image
|
|
1316
|
+
*/
|
|
1317
|
+
setImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
1318
|
+
/**
|
|
1319
|
+
* Update an image
|
|
1320
|
+
*/
|
|
1321
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
1325
1322
|
};
|
|
1326
1323
|
}
|
|
1327
1324
|
}
|
|
@@ -1329,9 +1326,8 @@ declare module '@tiptap/core' {
|
|
|
1329
1326
|
|
|
1330
1327
|
declare module '@tiptap/core' {
|
|
1331
1328
|
interface Commands<ReturnType> {
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
unsetTableCellBackground: () => ReturnType;
|
|
1329
|
+
videoUpload: {
|
|
1330
|
+
setVideoUpload: () => ReturnType;
|
|
1335
1331
|
};
|
|
1336
1332
|
}
|
|
1337
1333
|
}
|
|
@@ -1351,6 +1347,21 @@ declare module '@tiptap/core' {
|
|
|
1351
1347
|
}
|
|
1352
1348
|
|
|
1353
1349
|
|
|
1350
|
+
declare module '@tiptap/core' {
|
|
1351
|
+
interface Commands<ReturnType> {
|
|
1352
|
+
iframe: {
|
|
1353
|
+
/**
|
|
1354
|
+
* Add an iframe
|
|
1355
|
+
*/
|
|
1356
|
+
setIframe: (options: {
|
|
1357
|
+
src: string;
|
|
1358
|
+
service: string;
|
|
1359
|
+
}) => ReturnType;
|
|
1360
|
+
};
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
|
|
1354
1365
|
declare module '@tiptap/core' {
|
|
1355
1366
|
interface Commands<ReturnType> {
|
|
1356
1367
|
emoji: {
|
|
@@ -1374,8 +1385,9 @@ declare module '@tiptap/core' {
|
|
|
1374
1385
|
|
|
1375
1386
|
declare module '@tiptap/core' {
|
|
1376
1387
|
interface Commands<ReturnType> {
|
|
1377
|
-
|
|
1378
|
-
|
|
1388
|
+
tableOfContents: {
|
|
1389
|
+
setTableOfContents: () => ReturnType;
|
|
1390
|
+
removeTableOfContents: () => ReturnType;
|
|
1379
1391
|
};
|
|
1380
1392
|
}
|
|
1381
1393
|
}
|
|
@@ -1383,9 +1395,17 @@ declare module '@tiptap/core' {
|
|
|
1383
1395
|
|
|
1384
1396
|
declare module '@tiptap/core' {
|
|
1385
1397
|
interface Commands<ReturnType> {
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1398
|
+
excalidraw: {
|
|
1399
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
1400
|
+
};
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
|
|
1405
|
+
declare module '@tiptap/core' {
|
|
1406
|
+
interface Commands<ReturnType> {
|
|
1407
|
+
exportWord: {
|
|
1408
|
+
exportToWord: () => ReturnType;
|
|
1389
1409
|
};
|
|
1390
1410
|
}
|
|
1391
1411
|
}
|
|
@@ -1394,3 +1414,13 @@ declare module '@tiptap/core' {
|
|
|
1394
1414
|
declare namespace DropdownMenuShortcut {
|
|
1395
1415
|
var displayName: string;
|
|
1396
1416
|
}
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
declare namespace DialogHeader {
|
|
1420
|
+
var displayName: string;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
declare namespace DialogFooter {
|
|
1425
|
+
var displayName: string;
|
|
1426
|
+
}
|