reactjs-tiptap-editor 0.1.6 → 0.1.8
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/README.md +1 -3
- package/lib/index.d.cts +233 -51
- package/lib/index.d.ts +233 -51
- package/lib/locales-BYUc-X3A.cjs +1 -0
- package/lib/{locales-DIvc5AmE.js → locales-D2yZHlj9.js} +222 -45
- package/lib/reactjs-tiptap-editor.cjs +1 -1
- package/lib/reactjs-tiptap-editor.js +25 -24
- package/lib/style.css +1 -1
- package/lib/{utils-D6AlkkMx.js → utils-CC0wZtK5.js} +1200 -1158
- package/lib/utils-DjVD_MCw.cjs +152 -0
- package/package.json +15 -13
- package/lib/locales-DF-TdF7j.cjs +0 -1
- package/lib/utils-Dx9Jbr_E.cjs +0 -152
package/README.md
CHANGED
|
@@ -56,9 +56,7 @@ npm run playground
|
|
|
56
56
|
|
|
57
57
|
Thanks to the following friends for their contributions to project:
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
<img src="https://contrib.rocks/image?repo=hunghg255/reactjs-tiptap-editor" alt="contributors">
|
|
61
|
-
</a>
|
|
59
|
+

|
|
62
60
|
|
|
63
61
|
## Related
|
|
64
62
|
|
package/lib/index.d.cts
CHANGED
|
@@ -549,6 +549,8 @@ export declare const en: {
|
|
|
549
549
|
'editor.replace.caseSensitive': string;
|
|
550
550
|
'editor.mermaid.tooltip': string;
|
|
551
551
|
'editor.twitter.tooltip': string;
|
|
552
|
+
'editor.tooltip.flipX': string;
|
|
553
|
+
'editor.tooltip.flipY': string;
|
|
552
554
|
};
|
|
553
555
|
|
|
554
556
|
export declare const Excalidraw: Node_2<any, any>;
|
|
@@ -631,6 +633,175 @@ export declare const HorizontalRule: Node_2<HorizontalRuleOptions, any>;
|
|
|
631
633
|
export declare interface HorizontalRuleOptions extends HorizontalRuleOptions_2, GeneralOptions<HorizontalRuleOptions> {
|
|
632
634
|
}
|
|
633
635
|
|
|
636
|
+
export declare const hu_HU: {
|
|
637
|
+
'editor.remove': string;
|
|
638
|
+
'editor.copy': string;
|
|
639
|
+
'editor.words': string;
|
|
640
|
+
'editor.characters': string;
|
|
641
|
+
'editor.default': string;
|
|
642
|
+
'editor.recent': string;
|
|
643
|
+
'editor.nofill': string;
|
|
644
|
+
'editor.format': string;
|
|
645
|
+
'editor.delete': string;
|
|
646
|
+
'editor.edit': string;
|
|
647
|
+
'editor.settings': string;
|
|
648
|
+
'editor.table_of_content': string;
|
|
649
|
+
'editor.draghandle.tooltip': string;
|
|
650
|
+
'editor.copyToClipboard': string;
|
|
651
|
+
'editor.importWord.tooltip': string;
|
|
652
|
+
'editor.slash': string;
|
|
653
|
+
'editor.slash.empty': string;
|
|
654
|
+
'editor.slash.format': string;
|
|
655
|
+
'editor.slash.insert': string;
|
|
656
|
+
'editor.slash.embed': string;
|
|
657
|
+
'editor.content': string;
|
|
658
|
+
'editor.fontFamily.tooltip': string;
|
|
659
|
+
'editor.fontFamily.default.tooltip': string;
|
|
660
|
+
'editor.moremark': string;
|
|
661
|
+
'editor.size.small.tooltip': string;
|
|
662
|
+
'editor.size.medium.tooltip': string;
|
|
663
|
+
'editor.size.large.tooltip': string;
|
|
664
|
+
'editor.bold.tooltip': string;
|
|
665
|
+
'editor.italic.tooltip': string;
|
|
666
|
+
'editor.underline.tooltip': string;
|
|
667
|
+
'editor.strike.tooltip': string;
|
|
668
|
+
'editor.color.tooltip': string;
|
|
669
|
+
'editor.color.more': string;
|
|
670
|
+
'editor.highlight.tooltip': string;
|
|
671
|
+
'editor.lineheight.tooltip': string;
|
|
672
|
+
'editor.heading.tooltip': string;
|
|
673
|
+
'editor.heading.h1.tooltip': string;
|
|
674
|
+
'editor.heading.h2.tooltip': string;
|
|
675
|
+
'editor.heading.h3.tooltip': string;
|
|
676
|
+
'editor.heading.h4.tooltip': string;
|
|
677
|
+
'editor.heading.h5.tooltip': string;
|
|
678
|
+
'editor.heading.h6.tooltip': string;
|
|
679
|
+
'editor.paragraph.tooltip': string;
|
|
680
|
+
'editor.textalign.tooltip': string;
|
|
681
|
+
'editor.textalign.left.tooltip': string;
|
|
682
|
+
'editor.textalign.center.tooltip': string;
|
|
683
|
+
'editor.textalign.right.tooltip': string;
|
|
684
|
+
'editor.textalign.justify.tooltip': string;
|
|
685
|
+
'editor.indent': string;
|
|
686
|
+
'editor.indent.indent': string;
|
|
687
|
+
'editor.indent.outdent': string;
|
|
688
|
+
'editor.fontSize.tooltip': string;
|
|
689
|
+
'editor.fontSize.default.tooltip': string;
|
|
690
|
+
'editor.superscript.tooltip': string;
|
|
691
|
+
'editor.subscript.tooltip': string;
|
|
692
|
+
'editor.bulletlist.tooltip': string;
|
|
693
|
+
'editor.orderedlist.tooltip': string;
|
|
694
|
+
'editor.tasklist.tooltip': string;
|
|
695
|
+
'editor.indent.tooltip': string;
|
|
696
|
+
'editor.outdent.tooltip': string;
|
|
697
|
+
'editor.columns.tooltip': string;
|
|
698
|
+
'editor.link.tooltip': string;
|
|
699
|
+
'editor.link.unlink.tooltip': string;
|
|
700
|
+
'editor.link.open.tooltip': string;
|
|
701
|
+
'editor.link.edit.tooltip': string;
|
|
702
|
+
'editor.link.dialog.title': string;
|
|
703
|
+
'editor.link.dialog.link': string;
|
|
704
|
+
'editor.link.dialog.text': string;
|
|
705
|
+
'editor.link.dialog.openInNewTab': string;
|
|
706
|
+
'editor.link.dialog.link.placeholder': string;
|
|
707
|
+
'editor.link.dialog.text.placeholder': string;
|
|
708
|
+
'editor.link.dialog.button.apply': string;
|
|
709
|
+
'editor.image.tooltip': string;
|
|
710
|
+
'editor.image.dragger.tooltip': string;
|
|
711
|
+
'editor.image.float.left.tooltip': string;
|
|
712
|
+
'editor.image.float.none.tooltip': string;
|
|
713
|
+
'editor.image.float.right.tooltip': string;
|
|
714
|
+
'editor.image.dialog.title': string;
|
|
715
|
+
'editor.image.dialog.tab.url': string;
|
|
716
|
+
'editor.image.dialog.tab.upload': string;
|
|
717
|
+
'editor.image.dialog.tab.uploadCrop': string;
|
|
718
|
+
'editor.image.dialog.uploading': string;
|
|
719
|
+
'editor.link.dialog.inline': string;
|
|
720
|
+
'editor.image.dialog.form.link': string;
|
|
721
|
+
'editor.image.dialog.placeholder': string;
|
|
722
|
+
'editor.image.dialog.form.alt': string;
|
|
723
|
+
'editor.image.dialog.form.aspectRatio': string;
|
|
724
|
+
'editor.image.dialog.form.file': string;
|
|
725
|
+
'editor.image.dialog.button.apply': string;
|
|
726
|
+
'editor.video.tooltip': string;
|
|
727
|
+
'editor.video.dialog.tab.upload': string;
|
|
728
|
+
'editor.video.dialog.uploading': string;
|
|
729
|
+
'editor.video.dialog.title': string;
|
|
730
|
+
'editor.video.dialog.link': string;
|
|
731
|
+
'editor.video.dialog.placeholder': string;
|
|
732
|
+
'editor.video.dialog.button.apply': string;
|
|
733
|
+
'editor.table.tooltip': string;
|
|
734
|
+
'editor.table.menu.insert_table': string;
|
|
735
|
+
'editor.table.menu.insert_table.with_header_row': string;
|
|
736
|
+
'editor.table.menu.add_column_before': string;
|
|
737
|
+
'editor.table.menu.add_column_after': string;
|
|
738
|
+
'editor.table.menu.delete_column': string;
|
|
739
|
+
'editor.table.menu.add_row_before': string;
|
|
740
|
+
'editor.table.menu.add_row_after': string;
|
|
741
|
+
'editor.table.menu.delete_row': string;
|
|
742
|
+
'editor.table.menu.merge_or_split_cells': string;
|
|
743
|
+
'editor.table.menu.delete_table': string;
|
|
744
|
+
'editor.blockquote.tooltip': string;
|
|
745
|
+
'editor.horizontalrule.tooltip': string;
|
|
746
|
+
'editor.code.tooltip': string;
|
|
747
|
+
'editor.codeblock.tooltip': string;
|
|
748
|
+
'editor.clear.tooltip': string;
|
|
749
|
+
'editor.undo.tooltip': string;
|
|
750
|
+
'editor.redo.tooltip': string;
|
|
751
|
+
'editor.fullscreen.tooltip.fullscreen': string;
|
|
752
|
+
'editor.fullscreen.tooltip.exit': string;
|
|
753
|
+
'editor.imageUpload.cancel': string;
|
|
754
|
+
'editor.imageUpload.crop': string;
|
|
755
|
+
'editor.imageUpload.fileTypeNotSupported': string;
|
|
756
|
+
'editor.imageUpload.fileSizeTooBig': string;
|
|
757
|
+
'editor.table.menu.insertColumnBefore': string;
|
|
758
|
+
'editor.table.menu.insertColumnAfter': string;
|
|
759
|
+
'editor.table.menu.deleteColumn': string;
|
|
760
|
+
'editor.table.menu.insertRowAbove': string;
|
|
761
|
+
'editor.table.menu.insertRowBelow': string;
|
|
762
|
+
'editor.table.menu.deleteRow': string;
|
|
763
|
+
'editor.table.menu.mergeCells': string;
|
|
764
|
+
'editor.table.menu.splitCells': string;
|
|
765
|
+
'editor.table.menu.deleteTable': string;
|
|
766
|
+
'editor.table.menu.setCellsBgColor': string;
|
|
767
|
+
'editor.emoji.tooltip': string;
|
|
768
|
+
'editor.iframe.tooltip': string;
|
|
769
|
+
'editor.searchAndReplace.tooltip': string;
|
|
770
|
+
'editor.search.dialog.text': string;
|
|
771
|
+
'editor.replace.dialog.text': string;
|
|
772
|
+
'editor.replaceAll.dialog.text': string;
|
|
773
|
+
'editor.previous.dialog.text': string;
|
|
774
|
+
'editor.next.dialog.text': string;
|
|
775
|
+
no_result_found: string;
|
|
776
|
+
'Smileys & People': string;
|
|
777
|
+
'Animals & Nature': string;
|
|
778
|
+
'Food & Drink': string;
|
|
779
|
+
Activity: string;
|
|
780
|
+
'Travel & Places': string;
|
|
781
|
+
Object: string;
|
|
782
|
+
Symbol: string;
|
|
783
|
+
Flags: string;
|
|
784
|
+
'Frequently used': string;
|
|
785
|
+
'editor.formula.dialog.text': string;
|
|
786
|
+
'editor.katex.tooltip': string;
|
|
787
|
+
'editor.exportPdf.tooltip': string;
|
|
788
|
+
'editor.exportWord.tooltip': string;
|
|
789
|
+
'editor.importWrod.tooltip': string;
|
|
790
|
+
'editor.textDirection.tooltip': string;
|
|
791
|
+
'editor.textDirection.auto.tooltip': string;
|
|
792
|
+
'editor.textDirection.ltr.tooltip': string;
|
|
793
|
+
'editor.textDirection.rtl.tooltip': string;
|
|
794
|
+
'editor.attachment.tooltip': string;
|
|
795
|
+
'editor.attachment.uploading': string;
|
|
796
|
+
'editor.attachment.please_upload': string;
|
|
797
|
+
'editor.imageGif.tooltip': string;
|
|
798
|
+
'editor.replace.caseSensitive': string;
|
|
799
|
+
'editor.mermaid.tooltip': string;
|
|
800
|
+
'editor.twitter.tooltip': string;
|
|
801
|
+
'editor.tooltip.flipX': string;
|
|
802
|
+
'editor.tooltip.flipY': string;
|
|
803
|
+
};
|
|
804
|
+
|
|
634
805
|
export declare const Iframe: Node_2<any, any>;
|
|
635
806
|
|
|
636
807
|
declare interface IImageOptions extends GeneralOptions<IImageOptions> {
|
|
@@ -683,7 +854,7 @@ export declare interface ItalicOptions extends ItalicOptions_2, GeneralOptions<I
|
|
|
683
854
|
|
|
684
855
|
export declare const Katex: Node_2<IKatexOptions, any>;
|
|
685
856
|
|
|
686
|
-
declare type LanguageType = 'en' | 'vi' | 'zh_CN' | 'pt_BR' | (string & {});
|
|
857
|
+
declare type LanguageType = 'en' | 'hu_HU' | 'vi' | 'zh_CN' | 'pt_BR' | (string & {});
|
|
687
858
|
|
|
688
859
|
export declare const LineHeight: Extension<LineHeightOptions, any>;
|
|
689
860
|
|
|
@@ -926,6 +1097,8 @@ export declare const pt_BR: {
|
|
|
926
1097
|
'editor.replace.caseSensitive': string;
|
|
927
1098
|
'editor.mermaid.tooltip': string;
|
|
928
1099
|
'editor.twitter.tooltip': string;
|
|
1100
|
+
'editor.tooltip.flipX': string;
|
|
1101
|
+
'editor.tooltip.flipY': string;
|
|
929
1102
|
};
|
|
930
1103
|
|
|
931
1104
|
declare interface Result {
|
|
@@ -1006,7 +1179,12 @@ export declare interface SetImageAttrsOptions {
|
|
|
1006
1179
|
width?: number | string | null;
|
|
1007
1180
|
/** The alignment of the image. */
|
|
1008
1181
|
align?: 'left' | 'center' | 'right';
|
|
1182
|
+
/** Whether the image is inline. */
|
|
1009
1183
|
inline?: boolean;
|
|
1184
|
+
/** image FlipX */
|
|
1185
|
+
flipX?: boolean;
|
|
1186
|
+
/** image FlipY */
|
|
1187
|
+
flipY?: boolean;
|
|
1010
1188
|
}
|
|
1011
1189
|
|
|
1012
1190
|
export declare const SlashCommand: Extension<any, any>;
|
|
@@ -1310,6 +1488,8 @@ export declare const vi: {
|
|
|
1310
1488
|
'editor.replace.caseSensitive': string;
|
|
1311
1489
|
'editor.mermaid.tooltip': string;
|
|
1312
1490
|
'editor.twitter.tooltip': string;
|
|
1491
|
+
'editor.tooltip.flipX': string;
|
|
1492
|
+
'editor.tooltip.flipY': string;
|
|
1313
1493
|
};
|
|
1314
1494
|
|
|
1315
1495
|
export declare const Video: Node_2<VideoOptions, any>;
|
|
@@ -1509,6 +1689,8 @@ export declare const zh_CN: {
|
|
|
1509
1689
|
'editor.replace.caseSensitive': string;
|
|
1510
1690
|
'editor.mermaid.tooltip': string;
|
|
1511
1691
|
'editor.twitter.tooltip': string;
|
|
1692
|
+
'editor.tooltip.flipX': string;
|
|
1693
|
+
'editor.tooltip.flipY': string;
|
|
1512
1694
|
};
|
|
1513
1695
|
|
|
1514
1696
|
export { }
|
|
@@ -1574,26 +1756,6 @@ declare module '@tiptap/core' {
|
|
|
1574
1756
|
}
|
|
1575
1757
|
|
|
1576
1758
|
|
|
1577
|
-
declare module '@tiptap/core' {
|
|
1578
|
-
interface Commands<ReturnType> {
|
|
1579
|
-
imageResize: {
|
|
1580
|
-
/**
|
|
1581
|
-
* Add an image
|
|
1582
|
-
*/
|
|
1583
|
-
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
1584
|
-
/**
|
|
1585
|
-
* Update an image
|
|
1586
|
-
*/
|
|
1587
|
-
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
1588
|
-
/**
|
|
1589
|
-
* Set image alignment
|
|
1590
|
-
*/
|
|
1591
|
-
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
1592
|
-
};
|
|
1593
|
-
}
|
|
1594
|
-
}
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
1759
|
declare module '@tiptap/core' {
|
|
1598
1760
|
interface Commands<ReturnType> {
|
|
1599
1761
|
tableCellBackground: {
|
|
@@ -1606,8 +1768,14 @@ declare module '@tiptap/core' {
|
|
|
1606
1768
|
|
|
1607
1769
|
declare module '@tiptap/core' {
|
|
1608
1770
|
interface Commands<ReturnType> {
|
|
1609
|
-
|
|
1610
|
-
|
|
1771
|
+
iframe: {
|
|
1772
|
+
/**
|
|
1773
|
+
* Add an iframe
|
|
1774
|
+
*/
|
|
1775
|
+
setIframe: (options: {
|
|
1776
|
+
src: string;
|
|
1777
|
+
service: string;
|
|
1778
|
+
}) => ReturnType;
|
|
1611
1779
|
};
|
|
1612
1780
|
}
|
|
1613
1781
|
}
|
|
@@ -1629,26 +1797,19 @@ declare module '@tiptap/core' {
|
|
|
1629
1797
|
|
|
1630
1798
|
declare module '@tiptap/core' {
|
|
1631
1799
|
interface Commands<ReturnType> {
|
|
1632
|
-
|
|
1800
|
+
imageUpload: {
|
|
1633
1801
|
/**
|
|
1634
|
-
* Add an
|
|
1802
|
+
* Add an image
|
|
1635
1803
|
*/
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
declare module '@tiptap/core' {
|
|
1646
|
-
interface Commands<ReturnType> {
|
|
1647
|
-
emoji: {
|
|
1648
|
-
setEmoji: (emoji: {
|
|
1649
|
-
name: string;
|
|
1650
|
-
emoji: string;
|
|
1651
|
-
}) => ReturnType;
|
|
1804
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
1805
|
+
/**
|
|
1806
|
+
* Update an image
|
|
1807
|
+
*/
|
|
1808
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
1809
|
+
/**
|
|
1810
|
+
* Set image alignment
|
|
1811
|
+
*/
|
|
1812
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
1652
1813
|
};
|
|
1653
1814
|
}
|
|
1654
1815
|
}
|
|
@@ -1671,8 +1832,8 @@ declare module '@tiptap/core' {
|
|
|
1671
1832
|
|
|
1672
1833
|
declare module '@tiptap/core' {
|
|
1673
1834
|
interface Commands<ReturnType> {
|
|
1674
|
-
|
|
1675
|
-
|
|
1835
|
+
painter: {
|
|
1836
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
1676
1837
|
};
|
|
1677
1838
|
}
|
|
1678
1839
|
}
|
|
@@ -1680,9 +1841,20 @@ declare module '@tiptap/core' {
|
|
|
1680
1841
|
|
|
1681
1842
|
declare module '@tiptap/core' {
|
|
1682
1843
|
interface Commands<ReturnType> {
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1844
|
+
emoji: {
|
|
1845
|
+
setEmoji: (emoji: {
|
|
1846
|
+
name: string;
|
|
1847
|
+
emoji: string;
|
|
1848
|
+
}) => ReturnType;
|
|
1849
|
+
};
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
|
|
1854
|
+
declare module '@tiptap/core' {
|
|
1855
|
+
interface Commands<ReturnType> {
|
|
1856
|
+
katex: {
|
|
1857
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
1686
1858
|
};
|
|
1687
1859
|
}
|
|
1688
1860
|
}
|
|
@@ -1699,8 +1871,9 @@ declare module '@tiptap/core' {
|
|
|
1699
1871
|
|
|
1700
1872
|
declare module '@tiptap/core' {
|
|
1701
1873
|
interface Commands<ReturnType> {
|
|
1702
|
-
|
|
1703
|
-
|
|
1874
|
+
tableOfContents: {
|
|
1875
|
+
setTableOfContents: () => ReturnType;
|
|
1876
|
+
removeTableOfContents: () => ReturnType;
|
|
1704
1877
|
};
|
|
1705
1878
|
}
|
|
1706
1879
|
}
|
|
@@ -1708,8 +1881,8 @@ declare module '@tiptap/core' {
|
|
|
1708
1881
|
|
|
1709
1882
|
declare module '@tiptap/core' {
|
|
1710
1883
|
interface Commands<ReturnType> {
|
|
1711
|
-
|
|
1712
|
-
|
|
1884
|
+
excalidraw: {
|
|
1885
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
1713
1886
|
};
|
|
1714
1887
|
}
|
|
1715
1888
|
}
|
|
@@ -1727,7 +1900,16 @@ declare module '@tiptap/core' {
|
|
|
1727
1900
|
|
|
1728
1901
|
declare module '@tiptap/core' {
|
|
1729
1902
|
interface Commands<ReturnType> {
|
|
1730
|
-
|
|
1903
|
+
attachment: {
|
|
1904
|
+
setAttachment: (attrs?: unknown) => ReturnType;
|
|
1905
|
+
};
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
|
|
1910
|
+
declare module '@tiptap/core' {
|
|
1911
|
+
interface Commands<ReturnType> {
|
|
1912
|
+
imageGifUpload: {
|
|
1731
1913
|
/**
|
|
1732
1914
|
* Add an image gif
|
|
1733
1915
|
*/
|