reactjs-tiptap-editor 0.0.44 → 0.0.46

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
@@ -218,6 +218,13 @@ declare interface BubbleMenuProps {
218
218
  */
219
219
  hidden?: boolean;
220
220
  };
221
+ imageGifConfig?: {
222
+ /**
223
+ * @description Image menu hidden
224
+ * @default false
225
+ */
226
+ hidden?: boolean;
227
+ };
221
228
  videoConfig?: {
222
229
  /**
223
230
  * @description Video menu hidden
@@ -516,6 +523,7 @@ export declare const en: {
516
523
  'editor.attachment.tooltip': string;
517
524
  'editor.attachment.uploading': string;
518
525
  'editor.attachment.please_upload': string;
526
+ 'editor.imageGif.tooltip': string;
519
527
  };
520
528
 
521
529
  export declare const Excalidraw: Node_2<any, any>;
@@ -607,6 +615,15 @@ declare interface IKatexOptions {
607
615
  declare const Image_2: Node_2<ImageOptions, any>;
608
616
  export { Image_2 as Image }
609
617
 
618
+ export declare const ImageGif: Node_2<ImageGifOptions, any>;
619
+
620
+ declare interface ImageGifOptions extends ImageOptions {
621
+ /**
622
+ * The key for the gif https://giphy.com/
623
+ */
624
+ GIPHY_API_KEY: string;
625
+ }
626
+
610
627
  export declare const ImageUpload: Node_3<ImageUploadOptions, any>;
611
628
 
612
629
  export declare interface ImageUploadOptions {
@@ -870,6 +887,7 @@ export declare const pt_BR: {
870
887
  'editor.attachment.tooltip': string;
871
888
  'editor.attachment.uploading': string;
872
889
  'editor.attachment.please_upload': string;
890
+ 'editor.imageGif.tooltip': string;
873
891
  };
874
892
 
875
893
  declare interface Result {
@@ -1208,6 +1226,7 @@ export declare const vi: {
1208
1226
  'editor.attachment.tooltip': string;
1209
1227
  'editor.attachment.uploading': string;
1210
1228
  'editor.attachment.please_upload': string;
1229
+ 'editor.imageGif.tooltip': string;
1211
1230
  };
1212
1231
 
1213
1232
  export declare const Video: Node_2<VideoOptions, any>;
@@ -1404,6 +1423,7 @@ export declare const zh_CN: {
1404
1423
  'editor.attachment.tooltip': string;
1405
1424
  'editor.attachment.uploading': string;
1406
1425
  'editor.attachment.please_upload': string;
1426
+ 'editor.imageGif.tooltip': string;
1407
1427
  };
1408
1428
 
1409
1429
  export { }
@@ -1461,13 +1481,9 @@ declare module '@tiptap/core' {
1461
1481
 
1462
1482
  declare module '@tiptap/core' {
1463
1483
  interface Commands<ReturnType> {
1464
- columns: {
1465
- insertColumns: (attrs?: {
1466
- cols: number;
1467
- }) => ReturnType;
1468
- addColBefore: () => ReturnType;
1469
- addColAfter: () => ReturnType;
1470
- deleteCol: () => ReturnType;
1484
+ lineHeight: {
1485
+ setLineHeight: (lineHeight: string) => ReturnType;
1486
+ unsetLineHeight: () => ReturnType;
1471
1487
  };
1472
1488
  }
1473
1489
  }
@@ -1475,14 +1491,19 @@ declare module '@tiptap/core' {
1475
1491
 
1476
1492
  declare module '@tiptap/core' {
1477
1493
  interface Commands<ReturnType> {
1478
- iframe: {
1494
+ imageResize: {
1479
1495
  /**
1480
- * Add an iframe
1496
+ * Add an image
1481
1497
  */
1482
- setIframe: (options: {
1483
- src: string;
1484
- service: string;
1485
- }) => ReturnType;
1498
+ setImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1499
+ /**
1500
+ * Update an image
1501
+ */
1502
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1503
+ /**
1504
+ * Set image alignment
1505
+ */
1506
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
1486
1507
  };
1487
1508
  }
1488
1509
  }
@@ -1490,11 +1511,8 @@ declare module '@tiptap/core' {
1490
1511
 
1491
1512
  declare module '@tiptap/core' {
1492
1513
  interface Commands<ReturnType> {
1493
- emoji: {
1494
- setEmoji: (emoji: {
1495
- name: string;
1496
- emoji: string;
1497
- }) => ReturnType;
1514
+ imageUpload: {
1515
+ setImageUpload: () => ReturnType;
1498
1516
  };
1499
1517
  }
1500
1518
  }
@@ -1502,9 +1520,8 @@ declare module '@tiptap/core' {
1502
1520
 
1503
1521
  declare module '@tiptap/core' {
1504
1522
  interface Commands<ReturnType> {
1505
- lineHeight: {
1506
- setLineHeight: (lineHeight: string) => ReturnType;
1507
- unsetLineHeight: () => ReturnType;
1523
+ videoUpload: {
1524
+ setVideoUpload: () => ReturnType;
1508
1525
  };
1509
1526
  }
1510
1527
  }
@@ -1512,13 +1529,9 @@ declare module '@tiptap/core' {
1512
1529
 
1513
1530
  declare module '@tiptap/core' {
1514
1531
  interface Commands<ReturnType> {
1515
- search: {
1516
- setSearchTerm: (searchTerm: string) => ReturnType;
1517
- setReplaceTerm: (replaceTerm: string) => ReturnType;
1518
- replace: () => ReturnType;
1519
- replaceAll: () => ReturnType;
1520
- goToPrevSearchResult: () => void;
1521
- goToNextSearchResult: () => void;
1532
+ tableCellBackground: {
1533
+ setTableCellBackground: (color: string) => ReturnType;
1534
+ unsetTableCellBackground: () => ReturnType;
1522
1535
  };
1523
1536
  }
1524
1537
  }
@@ -1526,8 +1539,13 @@ declare module '@tiptap/core' {
1526
1539
 
1527
1540
  declare module '@tiptap/core' {
1528
1541
  interface Commands<ReturnType> {
1529
- katex: {
1530
- setKatex: (arg?: IKatexAttrs) => ReturnType;
1542
+ columns: {
1543
+ insertColumns: (attrs?: {
1544
+ cols: number;
1545
+ }) => ReturnType;
1546
+ addColBefore: () => ReturnType;
1547
+ addColAfter: () => ReturnType;
1548
+ deleteCol: () => ReturnType;
1531
1549
  };
1532
1550
  }
1533
1551
  }
@@ -1535,8 +1553,8 @@ declare module '@tiptap/core' {
1535
1553
 
1536
1554
  declare module '@tiptap/core' {
1537
1555
  interface Commands<ReturnType> {
1538
- imageUpload: {
1539
- setImageUpload: () => ReturnType;
1556
+ painter: {
1557
+ setPainter: (marks: Mark[]) => ReturnType;
1540
1558
  };
1541
1559
  }
1542
1560
  }
@@ -1544,8 +1562,14 @@ declare module '@tiptap/core' {
1544
1562
 
1545
1563
  declare module '@tiptap/core' {
1546
1564
  interface Commands<ReturnType> {
1547
- painter: {
1548
- setPainter: (marks: Mark[]) => ReturnType;
1565
+ iframe: {
1566
+ /**
1567
+ * Add an iframe
1568
+ */
1569
+ setIframe: (options: {
1570
+ src: string;
1571
+ service: string;
1572
+ }) => ReturnType;
1549
1573
  };
1550
1574
  }
1551
1575
  }
@@ -1553,9 +1577,11 @@ declare module '@tiptap/core' {
1553
1577
 
1554
1578
  declare module '@tiptap/core' {
1555
1579
  interface Commands<ReturnType> {
1556
- tableCellBackground: {
1557
- setTableCellBackground: (color: string) => ReturnType;
1558
- unsetTableCellBackground: () => ReturnType;
1580
+ emoji: {
1581
+ setEmoji: (emoji: {
1582
+ name: string;
1583
+ emoji: string;
1584
+ }) => ReturnType;
1559
1585
  };
1560
1586
  }
1561
1587
  }
@@ -1563,19 +1589,8 @@ declare module '@tiptap/core' {
1563
1589
 
1564
1590
  declare module '@tiptap/core' {
1565
1591
  interface Commands<ReturnType> {
1566
- imageResize: {
1567
- /**
1568
- * Add an image
1569
- */
1570
- setImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1571
- /**
1572
- * Update an image
1573
- */
1574
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1575
- /**
1576
- * Set image alignment
1577
- */
1578
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
1592
+ katex: {
1593
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
1579
1594
  };
1580
1595
  }
1581
1596
  }
@@ -1583,8 +1598,13 @@ declare module '@tiptap/core' {
1583
1598
 
1584
1599
  declare module '@tiptap/core' {
1585
1600
  interface Commands<ReturnType> {
1586
- videoUpload: {
1587
- setVideoUpload: () => ReturnType;
1601
+ search: {
1602
+ setSearchTerm: (searchTerm: string) => ReturnType;
1603
+ setReplaceTerm: (replaceTerm: string) => ReturnType;
1604
+ replace: () => ReturnType;
1605
+ replaceAll: () => ReturnType;
1606
+ goToPrevSearchResult: () => void;
1607
+ goToNextSearchResult: () => void;
1588
1608
  };
1589
1609
  }
1590
1610
  }
@@ -1599,6 +1619,15 @@ declare module '@tiptap/core' {
1599
1619
  }
1600
1620
 
1601
1621
 
1622
+ declare module '@tiptap/core' {
1623
+ interface Commands<ReturnType> {
1624
+ excalidraw: {
1625
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1626
+ };
1627
+ }
1628
+ }
1629
+
1630
+
1602
1631
  declare module '@tiptap/core' {
1603
1632
  interface Commands<ReturnType> {
1604
1633
  tableOfContents: {
@@ -1620,8 +1649,19 @@ declare module '@tiptap/core' {
1620
1649
 
1621
1650
  declare module '@tiptap/core' {
1622
1651
  interface Commands<ReturnType> {
1623
- excalidraw: {
1624
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1652
+ imageResize: {
1653
+ /**
1654
+ * Add an image gif
1655
+ */
1656
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1657
+ /**
1658
+ * Update an image gif
1659
+ */
1660
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1661
+ /**
1662
+ * Set image alignment
1663
+ */
1664
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
1625
1665
  };
1626
1666
  }
1627
1667
  }
package/lib/index.d.ts CHANGED
@@ -218,6 +218,13 @@ declare interface BubbleMenuProps {
218
218
  */
219
219
  hidden?: boolean;
220
220
  };
221
+ imageGifConfig?: {
222
+ /**
223
+ * @description Image menu hidden
224
+ * @default false
225
+ */
226
+ hidden?: boolean;
227
+ };
221
228
  videoConfig?: {
222
229
  /**
223
230
  * @description Video menu hidden
@@ -516,6 +523,7 @@ export declare const en: {
516
523
  'editor.attachment.tooltip': string;
517
524
  'editor.attachment.uploading': string;
518
525
  'editor.attachment.please_upload': string;
526
+ 'editor.imageGif.tooltip': string;
519
527
  };
520
528
 
521
529
  export declare const Excalidraw: Node_2<any, any>;
@@ -607,6 +615,15 @@ declare interface IKatexOptions {
607
615
  declare const Image_2: Node_2<ImageOptions, any>;
608
616
  export { Image_2 as Image }
609
617
 
618
+ export declare const ImageGif: Node_2<ImageGifOptions, any>;
619
+
620
+ declare interface ImageGifOptions extends ImageOptions {
621
+ /**
622
+ * The key for the gif https://giphy.com/
623
+ */
624
+ GIPHY_API_KEY: string;
625
+ }
626
+
610
627
  export declare const ImageUpload: Node_3<ImageUploadOptions, any>;
611
628
 
612
629
  export declare interface ImageUploadOptions {
@@ -870,6 +887,7 @@ export declare const pt_BR: {
870
887
  'editor.attachment.tooltip': string;
871
888
  'editor.attachment.uploading': string;
872
889
  'editor.attachment.please_upload': string;
890
+ 'editor.imageGif.tooltip': string;
873
891
  };
874
892
 
875
893
  declare interface Result {
@@ -1208,6 +1226,7 @@ export declare const vi: {
1208
1226
  'editor.attachment.tooltip': string;
1209
1227
  'editor.attachment.uploading': string;
1210
1228
  'editor.attachment.please_upload': string;
1229
+ 'editor.imageGif.tooltip': string;
1211
1230
  };
1212
1231
 
1213
1232
  export declare const Video: Node_2<VideoOptions, any>;
@@ -1404,6 +1423,7 @@ export declare const zh_CN: {
1404
1423
  'editor.attachment.tooltip': string;
1405
1424
  'editor.attachment.uploading': string;
1406
1425
  'editor.attachment.please_upload': string;
1426
+ 'editor.imageGif.tooltip': string;
1407
1427
  };
1408
1428
 
1409
1429
  export { }
@@ -1461,13 +1481,9 @@ declare module '@tiptap/core' {
1461
1481
 
1462
1482
  declare module '@tiptap/core' {
1463
1483
  interface Commands<ReturnType> {
1464
- columns: {
1465
- insertColumns: (attrs?: {
1466
- cols: number;
1467
- }) => ReturnType;
1468
- addColBefore: () => ReturnType;
1469
- addColAfter: () => ReturnType;
1470
- deleteCol: () => ReturnType;
1484
+ lineHeight: {
1485
+ setLineHeight: (lineHeight: string) => ReturnType;
1486
+ unsetLineHeight: () => ReturnType;
1471
1487
  };
1472
1488
  }
1473
1489
  }
@@ -1475,14 +1491,19 @@ declare module '@tiptap/core' {
1475
1491
 
1476
1492
  declare module '@tiptap/core' {
1477
1493
  interface Commands<ReturnType> {
1478
- iframe: {
1494
+ imageResize: {
1479
1495
  /**
1480
- * Add an iframe
1496
+ * Add an image
1481
1497
  */
1482
- setIframe: (options: {
1483
- src: string;
1484
- service: string;
1485
- }) => ReturnType;
1498
+ setImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1499
+ /**
1500
+ * Update an image
1501
+ */
1502
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1503
+ /**
1504
+ * Set image alignment
1505
+ */
1506
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
1486
1507
  };
1487
1508
  }
1488
1509
  }
@@ -1490,11 +1511,8 @@ declare module '@tiptap/core' {
1490
1511
 
1491
1512
  declare module '@tiptap/core' {
1492
1513
  interface Commands<ReturnType> {
1493
- emoji: {
1494
- setEmoji: (emoji: {
1495
- name: string;
1496
- emoji: string;
1497
- }) => ReturnType;
1514
+ imageUpload: {
1515
+ setImageUpload: () => ReturnType;
1498
1516
  };
1499
1517
  }
1500
1518
  }
@@ -1502,9 +1520,8 @@ declare module '@tiptap/core' {
1502
1520
 
1503
1521
  declare module '@tiptap/core' {
1504
1522
  interface Commands<ReturnType> {
1505
- lineHeight: {
1506
- setLineHeight: (lineHeight: string) => ReturnType;
1507
- unsetLineHeight: () => ReturnType;
1523
+ videoUpload: {
1524
+ setVideoUpload: () => ReturnType;
1508
1525
  };
1509
1526
  }
1510
1527
  }
@@ -1512,13 +1529,9 @@ declare module '@tiptap/core' {
1512
1529
 
1513
1530
  declare module '@tiptap/core' {
1514
1531
  interface Commands<ReturnType> {
1515
- search: {
1516
- setSearchTerm: (searchTerm: string) => ReturnType;
1517
- setReplaceTerm: (replaceTerm: string) => ReturnType;
1518
- replace: () => ReturnType;
1519
- replaceAll: () => ReturnType;
1520
- goToPrevSearchResult: () => void;
1521
- goToNextSearchResult: () => void;
1532
+ tableCellBackground: {
1533
+ setTableCellBackground: (color: string) => ReturnType;
1534
+ unsetTableCellBackground: () => ReturnType;
1522
1535
  };
1523
1536
  }
1524
1537
  }
@@ -1526,8 +1539,13 @@ declare module '@tiptap/core' {
1526
1539
 
1527
1540
  declare module '@tiptap/core' {
1528
1541
  interface Commands<ReturnType> {
1529
- katex: {
1530
- setKatex: (arg?: IKatexAttrs) => ReturnType;
1542
+ columns: {
1543
+ insertColumns: (attrs?: {
1544
+ cols: number;
1545
+ }) => ReturnType;
1546
+ addColBefore: () => ReturnType;
1547
+ addColAfter: () => ReturnType;
1548
+ deleteCol: () => ReturnType;
1531
1549
  };
1532
1550
  }
1533
1551
  }
@@ -1535,8 +1553,8 @@ declare module '@tiptap/core' {
1535
1553
 
1536
1554
  declare module '@tiptap/core' {
1537
1555
  interface Commands<ReturnType> {
1538
- imageUpload: {
1539
- setImageUpload: () => ReturnType;
1556
+ painter: {
1557
+ setPainter: (marks: Mark[]) => ReturnType;
1540
1558
  };
1541
1559
  }
1542
1560
  }
@@ -1544,8 +1562,14 @@ declare module '@tiptap/core' {
1544
1562
 
1545
1563
  declare module '@tiptap/core' {
1546
1564
  interface Commands<ReturnType> {
1547
- painter: {
1548
- setPainter: (marks: Mark[]) => ReturnType;
1565
+ iframe: {
1566
+ /**
1567
+ * Add an iframe
1568
+ */
1569
+ setIframe: (options: {
1570
+ src: string;
1571
+ service: string;
1572
+ }) => ReturnType;
1549
1573
  };
1550
1574
  }
1551
1575
  }
@@ -1553,9 +1577,11 @@ declare module '@tiptap/core' {
1553
1577
 
1554
1578
  declare module '@tiptap/core' {
1555
1579
  interface Commands<ReturnType> {
1556
- tableCellBackground: {
1557
- setTableCellBackground: (color: string) => ReturnType;
1558
- unsetTableCellBackground: () => ReturnType;
1580
+ emoji: {
1581
+ setEmoji: (emoji: {
1582
+ name: string;
1583
+ emoji: string;
1584
+ }) => ReturnType;
1559
1585
  };
1560
1586
  }
1561
1587
  }
@@ -1563,19 +1589,8 @@ declare module '@tiptap/core' {
1563
1589
 
1564
1590
  declare module '@tiptap/core' {
1565
1591
  interface Commands<ReturnType> {
1566
- imageResize: {
1567
- /**
1568
- * Add an image
1569
- */
1570
- setImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1571
- /**
1572
- * Update an image
1573
- */
1574
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1575
- /**
1576
- * Set image alignment
1577
- */
1578
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
1592
+ katex: {
1593
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
1579
1594
  };
1580
1595
  }
1581
1596
  }
@@ -1583,8 +1598,13 @@ declare module '@tiptap/core' {
1583
1598
 
1584
1599
  declare module '@tiptap/core' {
1585
1600
  interface Commands<ReturnType> {
1586
- videoUpload: {
1587
- setVideoUpload: () => ReturnType;
1601
+ search: {
1602
+ setSearchTerm: (searchTerm: string) => ReturnType;
1603
+ setReplaceTerm: (replaceTerm: string) => ReturnType;
1604
+ replace: () => ReturnType;
1605
+ replaceAll: () => ReturnType;
1606
+ goToPrevSearchResult: () => void;
1607
+ goToNextSearchResult: () => void;
1588
1608
  };
1589
1609
  }
1590
1610
  }
@@ -1599,6 +1619,15 @@ declare module '@tiptap/core' {
1599
1619
  }
1600
1620
 
1601
1621
 
1622
+ declare module '@tiptap/core' {
1623
+ interface Commands<ReturnType> {
1624
+ excalidraw: {
1625
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1626
+ };
1627
+ }
1628
+ }
1629
+
1630
+
1602
1631
  declare module '@tiptap/core' {
1603
1632
  interface Commands<ReturnType> {
1604
1633
  tableOfContents: {
@@ -1620,8 +1649,19 @@ declare module '@tiptap/core' {
1620
1649
 
1621
1650
  declare module '@tiptap/core' {
1622
1651
  interface Commands<ReturnType> {
1623
- excalidraw: {
1624
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1652
+ imageResize: {
1653
+ /**
1654
+ * Add an image gif
1655
+ */
1656
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1657
+ /**
1658
+ * Update an image gif
1659
+ */
1660
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1661
+ /**
1662
+ * Set image alignment
1663
+ */
1664
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
1625
1665
  };
1626
1666
  }
1627
1667
  }