reactjs-tiptap-editor 0.2.5 → 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 +3 -3
- package/lib/extension-bundle.d.cts +85 -68
- package/lib/extension-bundle.d.ts +85 -68
- package/lib/extension-bundle.js +1079 -2988
- 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 +85 -68
- package/lib/index.d.ts +85 -68
- package/lib/index.js +2 -2
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.cts +78 -68
- package/lib/locale-bundle.d.ts +78 -68
- 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 +3 -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>;
|
|
@@ -692,15 +699,19 @@ declare module '@tiptap/core' {
|
|
|
692
699
|
|
|
693
700
|
declare module '@tiptap/core' {
|
|
694
701
|
interface Commands<ReturnType> {
|
|
695
|
-
|
|
702
|
+
imageUpload: {
|
|
696
703
|
/**
|
|
697
|
-
*
|
|
704
|
+
* Add an image
|
|
698
705
|
*/
|
|
699
|
-
|
|
706
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
700
707
|
/**
|
|
701
|
-
*
|
|
708
|
+
* Update an image
|
|
702
709
|
*/
|
|
703
|
-
|
|
710
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
711
|
+
/**
|
|
712
|
+
* Set image alignment
|
|
713
|
+
*/
|
|
714
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
704
715
|
};
|
|
705
716
|
}
|
|
706
717
|
}
|
|
@@ -718,19 +729,15 @@ declare module '@tiptap/core' {
|
|
|
718
729
|
|
|
719
730
|
declare module '@tiptap/core' {
|
|
720
731
|
interface Commands<ReturnType> {
|
|
721
|
-
|
|
722
|
-
/**
|
|
723
|
-
* Add an image
|
|
724
|
-
*/
|
|
725
|
-
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
732
|
+
indent: {
|
|
726
733
|
/**
|
|
727
|
-
*
|
|
734
|
+
* Set the indent attribute
|
|
728
735
|
*/
|
|
729
|
-
|
|
736
|
+
indent: () => ReturnType;
|
|
730
737
|
/**
|
|
731
|
-
* Set
|
|
738
|
+
* Set the outdent attribute
|
|
732
739
|
*/
|
|
733
|
-
|
|
740
|
+
outdent: () => ReturnType;
|
|
734
741
|
};
|
|
735
742
|
}
|
|
736
743
|
}
|
|
@@ -738,8 +745,8 @@ declare module '@tiptap/core' {
|
|
|
738
745
|
|
|
739
746
|
declare module '@tiptap/core' {
|
|
740
747
|
interface Commands<ReturnType> {
|
|
741
|
-
|
|
742
|
-
|
|
748
|
+
katex: {
|
|
749
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
743
750
|
};
|
|
744
751
|
}
|
|
745
752
|
}
|
|
@@ -747,13 +754,35 @@ declare module '@tiptap/core' {
|
|
|
747
754
|
|
|
748
755
|
declare module '@tiptap/core' {
|
|
749
756
|
interface Commands<ReturnType> {
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
757
|
+
emoji: {
|
|
758
|
+
setEmoji: (emoji: {
|
|
759
|
+
name: string;
|
|
760
|
+
emoji: string;
|
|
753
761
|
}) => ReturnType;
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
declare module '@tiptap/core' {
|
|
768
|
+
interface Commands<ReturnType> {
|
|
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;
|
|
777
|
+
};
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
declare module '@tiptap/core' {
|
|
783
|
+
interface Commands<ReturnType> {
|
|
784
|
+
painter: {
|
|
785
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
757
786
|
};
|
|
758
787
|
}
|
|
759
788
|
}
|
|
@@ -786,11 +815,13 @@ declare module '@tiptap/core' {
|
|
|
786
815
|
|
|
787
816
|
declare module '@tiptap/core' {
|
|
788
817
|
interface Commands<ReturnType> {
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
emoji: string;
|
|
818
|
+
columns: {
|
|
819
|
+
insertColumns: (attrs?: {
|
|
820
|
+
cols: number;
|
|
793
821
|
}) => ReturnType;
|
|
822
|
+
addColBefore: () => ReturnType;
|
|
823
|
+
addColAfter: () => ReturnType;
|
|
824
|
+
deleteCol: () => ReturnType;
|
|
794
825
|
};
|
|
795
826
|
}
|
|
796
827
|
}
|
|
@@ -798,8 +829,8 @@ declare module '@tiptap/core' {
|
|
|
798
829
|
|
|
799
830
|
declare module '@tiptap/core' {
|
|
800
831
|
interface Commands<ReturnType> {
|
|
801
|
-
|
|
802
|
-
|
|
832
|
+
exportWord: {
|
|
833
|
+
exportToWord: () => ReturnType;
|
|
803
834
|
};
|
|
804
835
|
}
|
|
805
836
|
}
|
|
@@ -807,14 +838,9 @@ declare module '@tiptap/core' {
|
|
|
807
838
|
|
|
808
839
|
declare module '@tiptap/core' {
|
|
809
840
|
interface Commands<ReturnType> {
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
replace: () => ReturnType;
|
|
814
|
-
replaceAll: () => ReturnType;
|
|
815
|
-
goToPrevSearchResult: () => void;
|
|
816
|
-
goToNextSearchResult: () => void;
|
|
817
|
-
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
841
|
+
tableOfContents: {
|
|
842
|
+
setTableOfContents: () => ReturnType;
|
|
843
|
+
removeTableOfContents: () => ReturnType;
|
|
818
844
|
};
|
|
819
845
|
}
|
|
820
846
|
}
|
|
@@ -822,8 +848,8 @@ declare module '@tiptap/core' {
|
|
|
822
848
|
|
|
823
849
|
declare module '@tiptap/core' {
|
|
824
850
|
interface Commands<ReturnType> {
|
|
825
|
-
|
|
826
|
-
|
|
851
|
+
excalidraw: {
|
|
852
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
827
853
|
};
|
|
828
854
|
}
|
|
829
855
|
}
|
|
@@ -831,9 +857,9 @@ declare module '@tiptap/core' {
|
|
|
831
857
|
|
|
832
858
|
declare module '@tiptap/core' {
|
|
833
859
|
interface Commands<ReturnType> {
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
860
|
+
mermaid: {
|
|
861
|
+
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
862
|
+
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
837
863
|
};
|
|
838
864
|
}
|
|
839
865
|
}
|
|
@@ -841,8 +867,24 @@ declare module '@tiptap/core' {
|
|
|
841
867
|
|
|
842
868
|
declare module '@tiptap/core' {
|
|
843
869
|
interface Commands<ReturnType> {
|
|
844
|
-
|
|
845
|
-
|
|
870
|
+
twitter: {
|
|
871
|
+
/**
|
|
872
|
+
* Insert a tweet
|
|
873
|
+
* @param options The tweet attributes
|
|
874
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
875
|
+
*/
|
|
876
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
877
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
declare module '@tiptap/core' {
|
|
884
|
+
interface Commands<ReturnType> {
|
|
885
|
+
drawer: {
|
|
886
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
887
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
846
888
|
};
|
|
847
889
|
}
|
|
848
890
|
}
|
|
@@ -875,28 +917,3 @@ declare module '@tiptap/core' {
|
|
|
875
917
|
};
|
|
876
918
|
}
|
|
877
919
|
}
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
declare module '@tiptap/core' {
|
|
881
|
-
interface Commands<ReturnType> {
|
|
882
|
-
twitter: {
|
|
883
|
-
/**
|
|
884
|
-
* Insert a tweet
|
|
885
|
-
* @param options The tweet attributes
|
|
886
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
887
|
-
*/
|
|
888
|
-
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
889
|
-
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
890
|
-
};
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
declare module '@tiptap/core' {
|
|
896
|
-
interface Commands<ReturnType> {
|
|
897
|
-
mermaid: {
|
|
898
|
-
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
899
|
-
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
900
|
-
};
|
|
901
|
-
}
|
|
902
|
-
}
|
|
@@ -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>;
|
|
@@ -692,15 +699,19 @@ declare module '@tiptap/core' {
|
|
|
692
699
|
|
|
693
700
|
declare module '@tiptap/core' {
|
|
694
701
|
interface Commands<ReturnType> {
|
|
695
|
-
|
|
702
|
+
imageUpload: {
|
|
696
703
|
/**
|
|
697
|
-
*
|
|
704
|
+
* Add an image
|
|
698
705
|
*/
|
|
699
|
-
|
|
706
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
700
707
|
/**
|
|
701
|
-
*
|
|
708
|
+
* Update an image
|
|
702
709
|
*/
|
|
703
|
-
|
|
710
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
711
|
+
/**
|
|
712
|
+
* Set image alignment
|
|
713
|
+
*/
|
|
714
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
704
715
|
};
|
|
705
716
|
}
|
|
706
717
|
}
|
|
@@ -718,19 +729,15 @@ declare module '@tiptap/core' {
|
|
|
718
729
|
|
|
719
730
|
declare module '@tiptap/core' {
|
|
720
731
|
interface Commands<ReturnType> {
|
|
721
|
-
|
|
722
|
-
/**
|
|
723
|
-
* Add an image
|
|
724
|
-
*/
|
|
725
|
-
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
732
|
+
indent: {
|
|
726
733
|
/**
|
|
727
|
-
*
|
|
734
|
+
* Set the indent attribute
|
|
728
735
|
*/
|
|
729
|
-
|
|
736
|
+
indent: () => ReturnType;
|
|
730
737
|
/**
|
|
731
|
-
* Set
|
|
738
|
+
* Set the outdent attribute
|
|
732
739
|
*/
|
|
733
|
-
|
|
740
|
+
outdent: () => ReturnType;
|
|
734
741
|
};
|
|
735
742
|
}
|
|
736
743
|
}
|
|
@@ -738,8 +745,8 @@ declare module '@tiptap/core' {
|
|
|
738
745
|
|
|
739
746
|
declare module '@tiptap/core' {
|
|
740
747
|
interface Commands<ReturnType> {
|
|
741
|
-
|
|
742
|
-
|
|
748
|
+
katex: {
|
|
749
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
743
750
|
};
|
|
744
751
|
}
|
|
745
752
|
}
|
|
@@ -747,13 +754,35 @@ declare module '@tiptap/core' {
|
|
|
747
754
|
|
|
748
755
|
declare module '@tiptap/core' {
|
|
749
756
|
interface Commands<ReturnType> {
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
757
|
+
emoji: {
|
|
758
|
+
setEmoji: (emoji: {
|
|
759
|
+
name: string;
|
|
760
|
+
emoji: string;
|
|
753
761
|
}) => ReturnType;
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
declare module '@tiptap/core' {
|
|
768
|
+
interface Commands<ReturnType> {
|
|
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;
|
|
777
|
+
};
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
declare module '@tiptap/core' {
|
|
783
|
+
interface Commands<ReturnType> {
|
|
784
|
+
painter: {
|
|
785
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
757
786
|
};
|
|
758
787
|
}
|
|
759
788
|
}
|
|
@@ -786,11 +815,13 @@ declare module '@tiptap/core' {
|
|
|
786
815
|
|
|
787
816
|
declare module '@tiptap/core' {
|
|
788
817
|
interface Commands<ReturnType> {
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
emoji: string;
|
|
818
|
+
columns: {
|
|
819
|
+
insertColumns: (attrs?: {
|
|
820
|
+
cols: number;
|
|
793
821
|
}) => ReturnType;
|
|
822
|
+
addColBefore: () => ReturnType;
|
|
823
|
+
addColAfter: () => ReturnType;
|
|
824
|
+
deleteCol: () => ReturnType;
|
|
794
825
|
};
|
|
795
826
|
}
|
|
796
827
|
}
|
|
@@ -798,8 +829,8 @@ declare module '@tiptap/core' {
|
|
|
798
829
|
|
|
799
830
|
declare module '@tiptap/core' {
|
|
800
831
|
interface Commands<ReturnType> {
|
|
801
|
-
|
|
802
|
-
|
|
832
|
+
exportWord: {
|
|
833
|
+
exportToWord: () => ReturnType;
|
|
803
834
|
};
|
|
804
835
|
}
|
|
805
836
|
}
|
|
@@ -807,14 +838,9 @@ declare module '@tiptap/core' {
|
|
|
807
838
|
|
|
808
839
|
declare module '@tiptap/core' {
|
|
809
840
|
interface Commands<ReturnType> {
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
replace: () => ReturnType;
|
|
814
|
-
replaceAll: () => ReturnType;
|
|
815
|
-
goToPrevSearchResult: () => void;
|
|
816
|
-
goToNextSearchResult: () => void;
|
|
817
|
-
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
841
|
+
tableOfContents: {
|
|
842
|
+
setTableOfContents: () => ReturnType;
|
|
843
|
+
removeTableOfContents: () => ReturnType;
|
|
818
844
|
};
|
|
819
845
|
}
|
|
820
846
|
}
|
|
@@ -822,8 +848,8 @@ declare module '@tiptap/core' {
|
|
|
822
848
|
|
|
823
849
|
declare module '@tiptap/core' {
|
|
824
850
|
interface Commands<ReturnType> {
|
|
825
|
-
|
|
826
|
-
|
|
851
|
+
excalidraw: {
|
|
852
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
827
853
|
};
|
|
828
854
|
}
|
|
829
855
|
}
|
|
@@ -831,9 +857,9 @@ declare module '@tiptap/core' {
|
|
|
831
857
|
|
|
832
858
|
declare module '@tiptap/core' {
|
|
833
859
|
interface Commands<ReturnType> {
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
860
|
+
mermaid: {
|
|
861
|
+
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
862
|
+
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
837
863
|
};
|
|
838
864
|
}
|
|
839
865
|
}
|
|
@@ -841,8 +867,24 @@ declare module '@tiptap/core' {
|
|
|
841
867
|
|
|
842
868
|
declare module '@tiptap/core' {
|
|
843
869
|
interface Commands<ReturnType> {
|
|
844
|
-
|
|
845
|
-
|
|
870
|
+
twitter: {
|
|
871
|
+
/**
|
|
872
|
+
* Insert a tweet
|
|
873
|
+
* @param options The tweet attributes
|
|
874
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
875
|
+
*/
|
|
876
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
877
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
declare module '@tiptap/core' {
|
|
884
|
+
interface Commands<ReturnType> {
|
|
885
|
+
drawer: {
|
|
886
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
887
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
846
888
|
};
|
|
847
889
|
}
|
|
848
890
|
}
|
|
@@ -875,28 +917,3 @@ declare module '@tiptap/core' {
|
|
|
875
917
|
};
|
|
876
918
|
}
|
|
877
919
|
}
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
declare module '@tiptap/core' {
|
|
881
|
-
interface Commands<ReturnType> {
|
|
882
|
-
twitter: {
|
|
883
|
-
/**
|
|
884
|
-
* Insert a tweet
|
|
885
|
-
* @param options The tweet attributes
|
|
886
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
887
|
-
*/
|
|
888
|
-
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
889
|
-
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
890
|
-
};
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
declare module '@tiptap/core' {
|
|
896
|
-
interface Commands<ReturnType> {
|
|
897
|
-
mermaid: {
|
|
898
|
-
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
899
|
-
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
900
|
-
};
|
|
901
|
-
}
|
|
902
|
-
}
|