reactjs-tiptap-editor 0.2.2 → 0.2.3

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
@@ -242,22 +242,6 @@ declare module '@tiptap/core' {
242
242
  }
243
243
 
244
244
 
245
- declare module '@tiptap/core' {
246
- interface Commands<ReturnType> {
247
- indent: {
248
- /**
249
- * Set the indent attribute
250
- */
251
- indent: () => ReturnType;
252
- /**
253
- * Set the outdent attribute
254
- */
255
- outdent: () => ReturnType;
256
- };
257
- }
258
- }
259
-
260
-
261
245
  declare module '@tiptap/core' {
262
246
  interface Commands<ReturnType> {
263
247
  imageUpload: {
@@ -280,8 +264,9 @@ declare module '@tiptap/core' {
280
264
 
281
265
  declare module '@tiptap/core' {
282
266
  interface Commands<ReturnType> {
283
- painter: {
284
- setPainter: (marks: Mark[]) => ReturnType;
267
+ lineHeight: {
268
+ setLineHeight: (lineHeight: string) => ReturnType;
269
+ unsetLineHeight: () => ReturnType;
285
270
  };
286
271
  }
287
272
  }
@@ -289,9 +274,15 @@ declare module '@tiptap/core' {
289
274
 
290
275
  declare module '@tiptap/core' {
291
276
  interface Commands<ReturnType> {
292
- tableCellBackground: {
293
- setTableCellBackground: (color: string) => ReturnType;
294
- unsetTableCellBackground: () => ReturnType;
277
+ indent: {
278
+ /**
279
+ * Set the indent attribute
280
+ */
281
+ indent: () => ReturnType;
282
+ /**
283
+ * Set the outdent attribute
284
+ */
285
+ outdent: () => ReturnType;
295
286
  };
296
287
  }
297
288
  }
@@ -299,14 +290,9 @@ declare module '@tiptap/core' {
299
290
 
300
291
  declare module '@tiptap/core' {
301
292
  interface Commands<ReturnType> {
302
- iframe: {
303
- /**
304
- * Add an iframe
305
- */
306
- setIframe: (options: {
307
- src: string;
308
- service: string;
309
- }) => ReturnType;
293
+ tableCellBackground: {
294
+ setTableCellBackground: (color: string) => ReturnType;
295
+ unsetTableCellBackground: () => ReturnType;
310
296
  };
311
297
  }
312
298
  }
@@ -314,13 +300,14 @@ declare module '@tiptap/core' {
314
300
 
315
301
  declare module '@tiptap/core' {
316
302
  interface Commands<ReturnType> {
317
- columns: {
318
- insertColumns: (attrs?: {
319
- cols: number;
320
- }) => ReturnType;
321
- addColBefore: () => ReturnType;
322
- addColAfter: () => ReturnType;
323
- deleteCol: () => ReturnType;
303
+ twitter: {
304
+ /**
305
+ * Insert a tweet
306
+ * @param options The tweet attributes
307
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
308
+ */
309
+ setTweet: (options: SetTweetOptions) => ReturnType;
310
+ updateTweet: (options: SetTweetOptions) => ReturnType;
324
311
  };
325
312
  }
326
313
  }
@@ -328,11 +315,8 @@ declare module '@tiptap/core' {
328
315
 
329
316
  declare module '@tiptap/core' {
330
317
  interface Commands<ReturnType> {
331
- emoji: {
332
- setEmoji: (emoji: {
333
- name: string;
334
- emoji: string;
335
- }) => ReturnType;
318
+ excalidraw: {
319
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
336
320
  };
337
321
  }
338
322
  }
@@ -340,9 +324,13 @@ declare module '@tiptap/core' {
340
324
 
341
325
  declare module '@tiptap/core' {
342
326
  interface Commands<ReturnType> {
343
- lineHeight: {
344
- setLineHeight: (lineHeight: string) => ReturnType;
345
- unsetLineHeight: () => ReturnType;
327
+ columns: {
328
+ insertColumns: (attrs?: {
329
+ cols: number;
330
+ }) => ReturnType;
331
+ addColBefore: () => ReturnType;
332
+ addColAfter: () => ReturnType;
333
+ deleteCol: () => ReturnType;
346
334
  };
347
335
  }
348
336
  }
@@ -350,8 +338,8 @@ declare module '@tiptap/core' {
350
338
 
351
339
  declare module '@tiptap/core' {
352
340
  interface Commands<ReturnType> {
353
- katex: {
354
- setKatex: (arg?: IKatexAttrs) => ReturnType;
341
+ attachment: {
342
+ setAttachment: (attrs?: unknown) => ReturnType;
355
343
  };
356
344
  }
357
345
  }
@@ -374,8 +362,8 @@ declare module '@tiptap/core' {
374
362
 
375
363
  declare module '@tiptap/core' {
376
364
  interface Commands<ReturnType> {
377
- exportWord: {
378
- exportToWord: () => ReturnType;
365
+ katex: {
366
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
379
367
  };
380
368
  }
381
369
  }
@@ -383,9 +371,9 @@ declare module '@tiptap/core' {
383
371
 
384
372
  declare module '@tiptap/core' {
385
373
  interface Commands<ReturnType> {
386
- tableOfContents: {
387
- setTableOfContents: () => ReturnType;
388
- removeTableOfContents: () => ReturnType;
374
+ mermaid: {
375
+ setMermaid: (options: any, replace?: any) => ReturnType;
376
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
389
377
  };
390
378
  }
391
379
  }
@@ -393,8 +381,19 @@ declare module '@tiptap/core' {
393
381
 
394
382
  declare module '@tiptap/core' {
395
383
  interface Commands<ReturnType> {
396
- excalidraw: {
397
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
384
+ imageGifUpload: {
385
+ /**
386
+ * Add an image gif
387
+ */
388
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
389
+ /**
390
+ * Update an image gif
391
+ */
392
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
393
+ /**
394
+ * Set image alignment
395
+ */
396
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
398
397
  };
399
398
  }
400
399
  }
@@ -402,8 +401,8 @@ declare module '@tiptap/core' {
402
401
 
403
402
  declare module '@tiptap/core' {
404
403
  interface Commands<ReturnType> {
405
- attachment: {
406
- setAttachment: (attrs?: unknown) => ReturnType;
404
+ exportWord: {
405
+ exportToWord: () => ReturnType;
407
406
  };
408
407
  }
409
408
  }
@@ -411,9 +410,11 @@ declare module '@tiptap/core' {
411
410
 
412
411
  declare module '@tiptap/core' {
413
412
  interface Commands<ReturnType> {
414
- mermaid: {
415
- setMermaid: (options: any, replace?: any) => ReturnType;
416
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
413
+ emoji: {
414
+ setEmoji: (emoji: {
415
+ name: string;
416
+ emoji: string;
417
+ }) => ReturnType;
417
418
  };
418
419
  }
419
420
  }
@@ -421,14 +422,8 @@ declare module '@tiptap/core' {
421
422
 
422
423
  declare module '@tiptap/core' {
423
424
  interface Commands<ReturnType> {
424
- twitter: {
425
- /**
426
- * Insert a tweet
427
- * @param options The tweet attributes
428
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
429
- */
430
- setTweet: (options: SetTweetOptions) => ReturnType;
431
- updateTweet: (options: SetTweetOptions) => ReturnType;
425
+ painter: {
426
+ setPainter: (marks: Mark[]) => ReturnType;
432
427
  };
433
428
  }
434
429
  }
@@ -436,19 +431,24 @@ declare module '@tiptap/core' {
436
431
 
437
432
  declare module '@tiptap/core' {
438
433
  interface Commands<ReturnType> {
439
- imageGifUpload: {
440
- /**
441
- * Add an image gif
442
- */
443
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
444
- /**
445
- * Update an image gif
446
- */
447
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
434
+ iframe: {
448
435
  /**
449
- * Set image alignment
436
+ * Add an iframe
450
437
  */
451
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
438
+ setIframe: (options: {
439
+ src: string;
440
+ service: string;
441
+ }) => ReturnType;
442
+ };
443
+ }
444
+ }
445
+
446
+
447
+ declare module '@tiptap/core' {
448
+ interface Commands<ReturnType> {
449
+ tableOfContents: {
450
+ setTableOfContents: () => ReturnType;
451
+ removeTableOfContents: () => ReturnType;
452
452
  };
453
453
  }
454
454
  }
package/lib/index.d.ts CHANGED
@@ -242,22 +242,6 @@ declare module '@tiptap/core' {
242
242
  }
243
243
 
244
244
 
245
- declare module '@tiptap/core' {
246
- interface Commands<ReturnType> {
247
- indent: {
248
- /**
249
- * Set the indent attribute
250
- */
251
- indent: () => ReturnType;
252
- /**
253
- * Set the outdent attribute
254
- */
255
- outdent: () => ReturnType;
256
- };
257
- }
258
- }
259
-
260
-
261
245
  declare module '@tiptap/core' {
262
246
  interface Commands<ReturnType> {
263
247
  imageUpload: {
@@ -280,8 +264,9 @@ declare module '@tiptap/core' {
280
264
 
281
265
  declare module '@tiptap/core' {
282
266
  interface Commands<ReturnType> {
283
- painter: {
284
- setPainter: (marks: Mark[]) => ReturnType;
267
+ lineHeight: {
268
+ setLineHeight: (lineHeight: string) => ReturnType;
269
+ unsetLineHeight: () => ReturnType;
285
270
  };
286
271
  }
287
272
  }
@@ -289,9 +274,15 @@ declare module '@tiptap/core' {
289
274
 
290
275
  declare module '@tiptap/core' {
291
276
  interface Commands<ReturnType> {
292
- tableCellBackground: {
293
- setTableCellBackground: (color: string) => ReturnType;
294
- unsetTableCellBackground: () => ReturnType;
277
+ indent: {
278
+ /**
279
+ * Set the indent attribute
280
+ */
281
+ indent: () => ReturnType;
282
+ /**
283
+ * Set the outdent attribute
284
+ */
285
+ outdent: () => ReturnType;
295
286
  };
296
287
  }
297
288
  }
@@ -299,14 +290,9 @@ declare module '@tiptap/core' {
299
290
 
300
291
  declare module '@tiptap/core' {
301
292
  interface Commands<ReturnType> {
302
- iframe: {
303
- /**
304
- * Add an iframe
305
- */
306
- setIframe: (options: {
307
- src: string;
308
- service: string;
309
- }) => ReturnType;
293
+ tableCellBackground: {
294
+ setTableCellBackground: (color: string) => ReturnType;
295
+ unsetTableCellBackground: () => ReturnType;
310
296
  };
311
297
  }
312
298
  }
@@ -314,13 +300,14 @@ declare module '@tiptap/core' {
314
300
 
315
301
  declare module '@tiptap/core' {
316
302
  interface Commands<ReturnType> {
317
- columns: {
318
- insertColumns: (attrs?: {
319
- cols: number;
320
- }) => ReturnType;
321
- addColBefore: () => ReturnType;
322
- addColAfter: () => ReturnType;
323
- deleteCol: () => ReturnType;
303
+ twitter: {
304
+ /**
305
+ * Insert a tweet
306
+ * @param options The tweet attributes
307
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
308
+ */
309
+ setTweet: (options: SetTweetOptions) => ReturnType;
310
+ updateTweet: (options: SetTweetOptions) => ReturnType;
324
311
  };
325
312
  }
326
313
  }
@@ -328,11 +315,8 @@ declare module '@tiptap/core' {
328
315
 
329
316
  declare module '@tiptap/core' {
330
317
  interface Commands<ReturnType> {
331
- emoji: {
332
- setEmoji: (emoji: {
333
- name: string;
334
- emoji: string;
335
- }) => ReturnType;
318
+ excalidraw: {
319
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
336
320
  };
337
321
  }
338
322
  }
@@ -340,9 +324,13 @@ declare module '@tiptap/core' {
340
324
 
341
325
  declare module '@tiptap/core' {
342
326
  interface Commands<ReturnType> {
343
- lineHeight: {
344
- setLineHeight: (lineHeight: string) => ReturnType;
345
- unsetLineHeight: () => ReturnType;
327
+ columns: {
328
+ insertColumns: (attrs?: {
329
+ cols: number;
330
+ }) => ReturnType;
331
+ addColBefore: () => ReturnType;
332
+ addColAfter: () => ReturnType;
333
+ deleteCol: () => ReturnType;
346
334
  };
347
335
  }
348
336
  }
@@ -350,8 +338,8 @@ declare module '@tiptap/core' {
350
338
 
351
339
  declare module '@tiptap/core' {
352
340
  interface Commands<ReturnType> {
353
- katex: {
354
- setKatex: (arg?: IKatexAttrs) => ReturnType;
341
+ attachment: {
342
+ setAttachment: (attrs?: unknown) => ReturnType;
355
343
  };
356
344
  }
357
345
  }
@@ -374,8 +362,8 @@ declare module '@tiptap/core' {
374
362
 
375
363
  declare module '@tiptap/core' {
376
364
  interface Commands<ReturnType> {
377
- exportWord: {
378
- exportToWord: () => ReturnType;
365
+ katex: {
366
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
379
367
  };
380
368
  }
381
369
  }
@@ -383,9 +371,9 @@ declare module '@tiptap/core' {
383
371
 
384
372
  declare module '@tiptap/core' {
385
373
  interface Commands<ReturnType> {
386
- tableOfContents: {
387
- setTableOfContents: () => ReturnType;
388
- removeTableOfContents: () => ReturnType;
374
+ mermaid: {
375
+ setMermaid: (options: any, replace?: any) => ReturnType;
376
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
389
377
  };
390
378
  }
391
379
  }
@@ -393,8 +381,19 @@ declare module '@tiptap/core' {
393
381
 
394
382
  declare module '@tiptap/core' {
395
383
  interface Commands<ReturnType> {
396
- excalidraw: {
397
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
384
+ imageGifUpload: {
385
+ /**
386
+ * Add an image gif
387
+ */
388
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
389
+ /**
390
+ * Update an image gif
391
+ */
392
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
393
+ /**
394
+ * Set image alignment
395
+ */
396
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
398
397
  };
399
398
  }
400
399
  }
@@ -402,8 +401,8 @@ declare module '@tiptap/core' {
402
401
 
403
402
  declare module '@tiptap/core' {
404
403
  interface Commands<ReturnType> {
405
- attachment: {
406
- setAttachment: (attrs?: unknown) => ReturnType;
404
+ exportWord: {
405
+ exportToWord: () => ReturnType;
407
406
  };
408
407
  }
409
408
  }
@@ -411,9 +410,11 @@ declare module '@tiptap/core' {
411
410
 
412
411
  declare module '@tiptap/core' {
413
412
  interface Commands<ReturnType> {
414
- mermaid: {
415
- setMermaid: (options: any, replace?: any) => ReturnType;
416
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
413
+ emoji: {
414
+ setEmoji: (emoji: {
415
+ name: string;
416
+ emoji: string;
417
+ }) => ReturnType;
417
418
  };
418
419
  }
419
420
  }
@@ -421,14 +422,8 @@ declare module '@tiptap/core' {
421
422
 
422
423
  declare module '@tiptap/core' {
423
424
  interface Commands<ReturnType> {
424
- twitter: {
425
- /**
426
- * Insert a tweet
427
- * @param options The tweet attributes
428
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
429
- */
430
- setTweet: (options: SetTweetOptions) => ReturnType;
431
- updateTweet: (options: SetTweetOptions) => ReturnType;
425
+ painter: {
426
+ setPainter: (marks: Mark[]) => ReturnType;
432
427
  };
433
428
  }
434
429
  }
@@ -436,19 +431,24 @@ declare module '@tiptap/core' {
436
431
 
437
432
  declare module '@tiptap/core' {
438
433
  interface Commands<ReturnType> {
439
- imageGifUpload: {
440
- /**
441
- * Add an image gif
442
- */
443
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
444
- /**
445
- * Update an image gif
446
- */
447
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
434
+ iframe: {
448
435
  /**
449
- * Set image alignment
436
+ * Add an iframe
450
437
  */
451
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
438
+ setIframe: (options: {
439
+ src: string;
440
+ service: string;
441
+ }) => ReturnType;
442
+ };
443
+ }
444
+ }
445
+
446
+
447
+ declare module '@tiptap/core' {
448
+ interface Commands<ReturnType> {
449
+ tableOfContents: {
450
+ setTableOfContents: () => ReturnType;
451
+ removeTableOfContents: () => ReturnType;
452
452
  };
453
453
  }
454
454
  }