reactjs-tiptap-editor 0.2.4 → 0.2.6
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-B0-C2gAI.cjs +138 -0
- package/lib/RichTextEditor-DJXV8lHe.js +6100 -0
- package/lib/extension-bundle.cjs +20 -2
- package/lib/extension-bundle.d.cts +86 -69
- package/lib/extension-bundle.d.ts +86 -69
- package/lib/extension-bundle.js +1078 -2942
- package/lib/{index-BUxFK1y_.js → index-BngAFVnd.js} +13 -13
- package/lib/{index-DGpT32KX.cjs → index-C7UbZ2CS.cjs} +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +86 -69
- package/lib/index.d.ts +86 -69
- package/lib/index.js +2 -2
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.cts +79 -69
- package/lib/locale-bundle.d.ts +79 -69
- package/lib/locale-bundle.js +1 -1
- package/lib/style.css +1 -1
- package/lib/{tiptap-DXj1s_xP.js → tiptap-ahYjwjH-.js} +1063 -1314
- package/lib/tiptap-tmVDGH_r.cjs +116 -0
- package/lib/{vendor-DIvoV5tx.js → vendor-8yMXCLYm.js} +9718 -14257
- package/lib/{vendor-Dp07eU0H.cjs → vendor-DTqf5JcV.cjs} +66 -68
- package/package.json +7 -2
- package/lib/RichTextEditor-B4ASZID5.cjs +0 -138
- package/lib/RichTextEditor-yL5SRS_H.js +0 -5080
- package/lib/tiptap-BhYF9Ndj.cjs +0 -116
|
@@ -259,6 +259,13 @@ export declare const Column: Node_2<any, any>;
|
|
|
259
259
|
|
|
260
260
|
export declare const ColumnActionButton: Extension<any, any>;
|
|
261
261
|
|
|
262
|
+
export declare const Drawer: Node_2<DrawerOptions, any>;
|
|
263
|
+
|
|
264
|
+
declare interface DrawerOptions extends GeneralOptions<DrawerOptions> {
|
|
265
|
+
/** Function for uploading files */
|
|
266
|
+
upload?: (file: File) => Promise<string>;
|
|
267
|
+
}
|
|
268
|
+
|
|
262
269
|
export declare const Emoji: Node_2<any, any>;
|
|
263
270
|
|
|
264
271
|
export declare const Excalidraw: Node_2<any, any>;
|
|
@@ -690,6 +697,26 @@ declare module '@tiptap/core' {
|
|
|
690
697
|
}
|
|
691
698
|
|
|
692
699
|
|
|
700
|
+
declare module '@tiptap/core' {
|
|
701
|
+
interface Commands<ReturnType> {
|
|
702
|
+
imageUpload: {
|
|
703
|
+
/**
|
|
704
|
+
* Add an image
|
|
705
|
+
*/
|
|
706
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
707
|
+
/**
|
|
708
|
+
* Update an image
|
|
709
|
+
*/
|
|
710
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
711
|
+
/**
|
|
712
|
+
* Set image alignment
|
|
713
|
+
*/
|
|
714
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
|
|
693
720
|
declare module '@tiptap/core' {
|
|
694
721
|
interface Commands<ReturnType> {
|
|
695
722
|
lineHeight: {
|
|
@@ -718,19 +745,8 @@ declare module '@tiptap/core' {
|
|
|
718
745
|
|
|
719
746
|
declare module '@tiptap/core' {
|
|
720
747
|
interface Commands<ReturnType> {
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
* Add an image
|
|
724
|
-
*/
|
|
725
|
-
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
726
|
-
/**
|
|
727
|
-
* Update an image
|
|
728
|
-
*/
|
|
729
|
-
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
730
|
-
/**
|
|
731
|
-
* Set image alignment
|
|
732
|
-
*/
|
|
733
|
-
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
748
|
+
katex: {
|
|
749
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
734
750
|
};
|
|
735
751
|
}
|
|
736
752
|
}
|
|
@@ -738,8 +754,11 @@ declare module '@tiptap/core' {
|
|
|
738
754
|
|
|
739
755
|
declare module '@tiptap/core' {
|
|
740
756
|
interface Commands<ReturnType> {
|
|
741
|
-
|
|
742
|
-
|
|
757
|
+
emoji: {
|
|
758
|
+
setEmoji: (emoji: {
|
|
759
|
+
name: string;
|
|
760
|
+
emoji: string;
|
|
761
|
+
}) => ReturnType;
|
|
743
762
|
};
|
|
744
763
|
}
|
|
745
764
|
}
|
|
@@ -747,9 +766,14 @@ declare module '@tiptap/core' {
|
|
|
747
766
|
|
|
748
767
|
declare module '@tiptap/core' {
|
|
749
768
|
interface Commands<ReturnType> {
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
769
|
+
search: {
|
|
770
|
+
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
771
|
+
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
772
|
+
replace: () => ReturnType;
|
|
773
|
+
replaceAll: () => ReturnType;
|
|
774
|
+
goToPrevSearchResult: () => void;
|
|
775
|
+
goToNextSearchResult: () => void;
|
|
776
|
+
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
753
777
|
};
|
|
754
778
|
}
|
|
755
779
|
}
|
|
@@ -757,13 +781,8 @@ declare module '@tiptap/core' {
|
|
|
757
781
|
|
|
758
782
|
declare module '@tiptap/core' {
|
|
759
783
|
interface Commands<ReturnType> {
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
cols: number;
|
|
763
|
-
}) => ReturnType;
|
|
764
|
-
addColBefore: () => ReturnType;
|
|
765
|
-
addColAfter: () => ReturnType;
|
|
766
|
-
deleteCol: () => ReturnType;
|
|
784
|
+
painter: {
|
|
785
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
767
786
|
};
|
|
768
787
|
}
|
|
769
788
|
}
|
|
@@ -786,20 +805,9 @@ declare module '@tiptap/core' {
|
|
|
786
805
|
|
|
787
806
|
declare module '@tiptap/core' {
|
|
788
807
|
interface Commands<ReturnType> {
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
emoji: string;
|
|
793
|
-
}) => ReturnType;
|
|
794
|
-
};
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
declare module '@tiptap/core' {
|
|
800
|
-
interface Commands<ReturnType> {
|
|
801
|
-
katex: {
|
|
802
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
808
|
+
tableCellBackground: {
|
|
809
|
+
setTableCellBackground: (color: string) => ReturnType;
|
|
810
|
+
unsetTableCellBackground: () => ReturnType;
|
|
803
811
|
};
|
|
804
812
|
}
|
|
805
813
|
}
|
|
@@ -807,14 +815,13 @@ declare module '@tiptap/core' {
|
|
|
807
815
|
|
|
808
816
|
declare module '@tiptap/core' {
|
|
809
817
|
interface Commands<ReturnType> {
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
818
|
+
columns: {
|
|
819
|
+
insertColumns: (attrs?: {
|
|
820
|
+
cols: number;
|
|
821
|
+
}) => ReturnType;
|
|
822
|
+
addColBefore: () => ReturnType;
|
|
823
|
+
addColAfter: () => ReturnType;
|
|
824
|
+
deleteCol: () => ReturnType;
|
|
818
825
|
};
|
|
819
826
|
}
|
|
820
827
|
}
|
|
@@ -850,19 +857,24 @@ declare module '@tiptap/core' {
|
|
|
850
857
|
|
|
851
858
|
declare module '@tiptap/core' {
|
|
852
859
|
interface Commands<ReturnType> {
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
860
|
+
mermaid: {
|
|
861
|
+
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
862
|
+
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
863
|
+
};
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
|
|
868
|
+
declare module '@tiptap/core' {
|
|
869
|
+
interface Commands<ReturnType> {
|
|
870
|
+
twitter: {
|
|
862
871
|
/**
|
|
863
|
-
*
|
|
872
|
+
* Insert a tweet
|
|
873
|
+
* @param options The tweet attributes
|
|
874
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
864
875
|
*/
|
|
865
|
-
|
|
876
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
877
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
866
878
|
};
|
|
867
879
|
}
|
|
868
880
|
}
|
|
@@ -870,8 +882,9 @@ declare module '@tiptap/core' {
|
|
|
870
882
|
|
|
871
883
|
declare module '@tiptap/core' {
|
|
872
884
|
interface Commands<ReturnType> {
|
|
873
|
-
|
|
874
|
-
|
|
885
|
+
drawer: {
|
|
886
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
887
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
875
888
|
};
|
|
876
889
|
}
|
|
877
890
|
}
|
|
@@ -879,9 +892,8 @@ declare module '@tiptap/core' {
|
|
|
879
892
|
|
|
880
893
|
declare module '@tiptap/core' {
|
|
881
894
|
interface Commands<ReturnType> {
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
895
|
+
attachment: {
|
|
896
|
+
setAttachment: (attrs?: unknown) => ReturnType;
|
|
885
897
|
};
|
|
886
898
|
}
|
|
887
899
|
}
|
|
@@ -889,14 +901,19 @@ declare module '@tiptap/core' {
|
|
|
889
901
|
|
|
890
902
|
declare module '@tiptap/core' {
|
|
891
903
|
interface Commands<ReturnType> {
|
|
892
|
-
|
|
904
|
+
imageGifUpload: {
|
|
893
905
|
/**
|
|
894
|
-
*
|
|
895
|
-
* @param options The tweet attributes
|
|
896
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
906
|
+
* Add an image gif
|
|
897
907
|
*/
|
|
898
|
-
|
|
899
|
-
|
|
908
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
909
|
+
/**
|
|
910
|
+
* Update an image gif
|
|
911
|
+
*/
|
|
912
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
913
|
+
/**
|
|
914
|
+
* Set image alignment
|
|
915
|
+
*/
|
|
916
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
900
917
|
};
|
|
901
918
|
}
|
|
902
919
|
}
|
|
@@ -259,6 +259,13 @@ export declare const Column: Node_2<any, any>;
|
|
|
259
259
|
|
|
260
260
|
export declare const ColumnActionButton: Extension<any, any>;
|
|
261
261
|
|
|
262
|
+
export declare const Drawer: Node_2<DrawerOptions, any>;
|
|
263
|
+
|
|
264
|
+
declare interface DrawerOptions extends GeneralOptions<DrawerOptions> {
|
|
265
|
+
/** Function for uploading files */
|
|
266
|
+
upload?: (file: File) => Promise<string>;
|
|
267
|
+
}
|
|
268
|
+
|
|
262
269
|
export declare const Emoji: Node_2<any, any>;
|
|
263
270
|
|
|
264
271
|
export declare const Excalidraw: Node_2<any, any>;
|
|
@@ -690,6 +697,26 @@ declare module '@tiptap/core' {
|
|
|
690
697
|
}
|
|
691
698
|
|
|
692
699
|
|
|
700
|
+
declare module '@tiptap/core' {
|
|
701
|
+
interface Commands<ReturnType> {
|
|
702
|
+
imageUpload: {
|
|
703
|
+
/**
|
|
704
|
+
* Add an image
|
|
705
|
+
*/
|
|
706
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
707
|
+
/**
|
|
708
|
+
* Update an image
|
|
709
|
+
*/
|
|
710
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
711
|
+
/**
|
|
712
|
+
* Set image alignment
|
|
713
|
+
*/
|
|
714
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
|
|
693
720
|
declare module '@tiptap/core' {
|
|
694
721
|
interface Commands<ReturnType> {
|
|
695
722
|
lineHeight: {
|
|
@@ -718,19 +745,8 @@ declare module '@tiptap/core' {
|
|
|
718
745
|
|
|
719
746
|
declare module '@tiptap/core' {
|
|
720
747
|
interface Commands<ReturnType> {
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
* Add an image
|
|
724
|
-
*/
|
|
725
|
-
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
726
|
-
/**
|
|
727
|
-
* Update an image
|
|
728
|
-
*/
|
|
729
|
-
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
730
|
-
/**
|
|
731
|
-
* Set image alignment
|
|
732
|
-
*/
|
|
733
|
-
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
748
|
+
katex: {
|
|
749
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
734
750
|
};
|
|
735
751
|
}
|
|
736
752
|
}
|
|
@@ -738,8 +754,11 @@ declare module '@tiptap/core' {
|
|
|
738
754
|
|
|
739
755
|
declare module '@tiptap/core' {
|
|
740
756
|
interface Commands<ReturnType> {
|
|
741
|
-
|
|
742
|
-
|
|
757
|
+
emoji: {
|
|
758
|
+
setEmoji: (emoji: {
|
|
759
|
+
name: string;
|
|
760
|
+
emoji: string;
|
|
761
|
+
}) => ReturnType;
|
|
743
762
|
};
|
|
744
763
|
}
|
|
745
764
|
}
|
|
@@ -747,9 +766,14 @@ declare module '@tiptap/core' {
|
|
|
747
766
|
|
|
748
767
|
declare module '@tiptap/core' {
|
|
749
768
|
interface Commands<ReturnType> {
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
769
|
+
search: {
|
|
770
|
+
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
771
|
+
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
772
|
+
replace: () => ReturnType;
|
|
773
|
+
replaceAll: () => ReturnType;
|
|
774
|
+
goToPrevSearchResult: () => void;
|
|
775
|
+
goToNextSearchResult: () => void;
|
|
776
|
+
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
753
777
|
};
|
|
754
778
|
}
|
|
755
779
|
}
|
|
@@ -757,13 +781,8 @@ declare module '@tiptap/core' {
|
|
|
757
781
|
|
|
758
782
|
declare module '@tiptap/core' {
|
|
759
783
|
interface Commands<ReturnType> {
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
cols: number;
|
|
763
|
-
}) => ReturnType;
|
|
764
|
-
addColBefore: () => ReturnType;
|
|
765
|
-
addColAfter: () => ReturnType;
|
|
766
|
-
deleteCol: () => ReturnType;
|
|
784
|
+
painter: {
|
|
785
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
767
786
|
};
|
|
768
787
|
}
|
|
769
788
|
}
|
|
@@ -786,20 +805,9 @@ declare module '@tiptap/core' {
|
|
|
786
805
|
|
|
787
806
|
declare module '@tiptap/core' {
|
|
788
807
|
interface Commands<ReturnType> {
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
emoji: string;
|
|
793
|
-
}) => ReturnType;
|
|
794
|
-
};
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
declare module '@tiptap/core' {
|
|
800
|
-
interface Commands<ReturnType> {
|
|
801
|
-
katex: {
|
|
802
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
808
|
+
tableCellBackground: {
|
|
809
|
+
setTableCellBackground: (color: string) => ReturnType;
|
|
810
|
+
unsetTableCellBackground: () => ReturnType;
|
|
803
811
|
};
|
|
804
812
|
}
|
|
805
813
|
}
|
|
@@ -807,14 +815,13 @@ declare module '@tiptap/core' {
|
|
|
807
815
|
|
|
808
816
|
declare module '@tiptap/core' {
|
|
809
817
|
interface Commands<ReturnType> {
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
818
|
+
columns: {
|
|
819
|
+
insertColumns: (attrs?: {
|
|
820
|
+
cols: number;
|
|
821
|
+
}) => ReturnType;
|
|
822
|
+
addColBefore: () => ReturnType;
|
|
823
|
+
addColAfter: () => ReturnType;
|
|
824
|
+
deleteCol: () => ReturnType;
|
|
818
825
|
};
|
|
819
826
|
}
|
|
820
827
|
}
|
|
@@ -850,19 +857,24 @@ declare module '@tiptap/core' {
|
|
|
850
857
|
|
|
851
858
|
declare module '@tiptap/core' {
|
|
852
859
|
interface Commands<ReturnType> {
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
860
|
+
mermaid: {
|
|
861
|
+
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
862
|
+
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
863
|
+
};
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
|
|
868
|
+
declare module '@tiptap/core' {
|
|
869
|
+
interface Commands<ReturnType> {
|
|
870
|
+
twitter: {
|
|
862
871
|
/**
|
|
863
|
-
*
|
|
872
|
+
* Insert a tweet
|
|
873
|
+
* @param options The tweet attributes
|
|
874
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
864
875
|
*/
|
|
865
|
-
|
|
876
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
877
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
866
878
|
};
|
|
867
879
|
}
|
|
868
880
|
}
|
|
@@ -870,8 +882,9 @@ declare module '@tiptap/core' {
|
|
|
870
882
|
|
|
871
883
|
declare module '@tiptap/core' {
|
|
872
884
|
interface Commands<ReturnType> {
|
|
873
|
-
|
|
874
|
-
|
|
885
|
+
drawer: {
|
|
886
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
887
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
875
888
|
};
|
|
876
889
|
}
|
|
877
890
|
}
|
|
@@ -879,9 +892,8 @@ declare module '@tiptap/core' {
|
|
|
879
892
|
|
|
880
893
|
declare module '@tiptap/core' {
|
|
881
894
|
interface Commands<ReturnType> {
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
895
|
+
attachment: {
|
|
896
|
+
setAttachment: (attrs?: unknown) => ReturnType;
|
|
885
897
|
};
|
|
886
898
|
}
|
|
887
899
|
}
|
|
@@ -889,14 +901,19 @@ declare module '@tiptap/core' {
|
|
|
889
901
|
|
|
890
902
|
declare module '@tiptap/core' {
|
|
891
903
|
interface Commands<ReturnType> {
|
|
892
|
-
|
|
904
|
+
imageGifUpload: {
|
|
893
905
|
/**
|
|
894
|
-
*
|
|
895
|
-
* @param options The tweet attributes
|
|
896
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
906
|
+
* Add an image gif
|
|
897
907
|
*/
|
|
898
|
-
|
|
899
|
-
|
|
908
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
909
|
+
/**
|
|
910
|
+
* Update an image gif
|
|
911
|
+
*/
|
|
912
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
913
|
+
/**
|
|
914
|
+
* Set image alignment
|
|
915
|
+
*/
|
|
916
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
900
917
|
};
|
|
901
918
|
}
|
|
902
919
|
}
|