reactjs-tiptap-editor 0.2.3 → 0.2.5

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.
@@ -692,19 +692,15 @@ declare module '@tiptap/core' {
692
692
 
693
693
  declare module '@tiptap/core' {
694
694
  interface Commands<ReturnType> {
695
- imageUpload: {
696
- /**
697
- * Add an image
698
- */
699
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
695
+ indent: {
700
696
  /**
701
- * Update an image
697
+ * Set the indent attribute
702
698
  */
703
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
699
+ indent: () => ReturnType;
704
700
  /**
705
- * Set image alignment
701
+ * Set the outdent attribute
706
702
  */
707
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
703
+ outdent: () => ReturnType;
708
704
  };
709
705
  }
710
706
  }
@@ -722,15 +718,19 @@ declare module '@tiptap/core' {
722
718
 
723
719
  declare module '@tiptap/core' {
724
720
  interface Commands<ReturnType> {
725
- indent: {
721
+ imageUpload: {
726
722
  /**
727
- * Set the indent attribute
723
+ * Add an image
728
724
  */
729
- indent: () => ReturnType;
725
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
730
726
  /**
731
- * Set the outdent attribute
727
+ * Update an image
732
728
  */
733
- outdent: () => ReturnType;
729
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
730
+ /**
731
+ * Set image alignment
732
+ */
733
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
734
734
  };
735
735
  }
736
736
  }
@@ -738,9 +738,8 @@ declare module '@tiptap/core' {
738
738
 
739
739
  declare module '@tiptap/core' {
740
740
  interface Commands<ReturnType> {
741
- tableCellBackground: {
742
- setTableCellBackground: (color: string) => ReturnType;
743
- unsetTableCellBackground: () => ReturnType;
741
+ painter: {
742
+ setPainter: (marks: Mark[]) => ReturnType;
744
743
  };
745
744
  }
746
745
  }
@@ -748,14 +747,28 @@ declare module '@tiptap/core' {
748
747
 
749
748
  declare module '@tiptap/core' {
750
749
  interface Commands<ReturnType> {
751
- twitter: {
750
+ columns: {
751
+ insertColumns: (attrs?: {
752
+ cols: number;
753
+ }) => ReturnType;
754
+ addColBefore: () => ReturnType;
755
+ addColAfter: () => ReturnType;
756
+ deleteCol: () => ReturnType;
757
+ };
758
+ }
759
+ }
760
+
761
+
762
+ declare module '@tiptap/core' {
763
+ interface Commands<ReturnType> {
764
+ iframe: {
752
765
  /**
753
- * Insert a tweet
754
- * @param options The tweet attributes
755
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
766
+ * Add an iframe
756
767
  */
757
- setTweet: (options: SetTweetOptions) => ReturnType;
758
- updateTweet: (options: SetTweetOptions) => ReturnType;
768
+ setIframe: (options: {
769
+ src: string;
770
+ service: string;
771
+ }) => ReturnType;
759
772
  };
760
773
  }
761
774
  }
@@ -763,8 +776,9 @@ declare module '@tiptap/core' {
763
776
 
764
777
  declare module '@tiptap/core' {
765
778
  interface Commands<ReturnType> {
766
- excalidraw: {
767
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
779
+ tableCellBackground: {
780
+ setTableCellBackground: (color: string) => ReturnType;
781
+ unsetTableCellBackground: () => ReturnType;
768
782
  };
769
783
  }
770
784
  }
@@ -772,13 +786,11 @@ declare module '@tiptap/core' {
772
786
 
773
787
  declare module '@tiptap/core' {
774
788
  interface Commands<ReturnType> {
775
- columns: {
776
- insertColumns: (attrs?: {
777
- cols: number;
789
+ emoji: {
790
+ setEmoji: (emoji: {
791
+ name: string;
792
+ emoji: string;
778
793
  }) => ReturnType;
779
- addColBefore: () => ReturnType;
780
- addColAfter: () => ReturnType;
781
- deleteCol: () => ReturnType;
782
794
  };
783
795
  }
784
796
  }
@@ -786,8 +798,8 @@ declare module '@tiptap/core' {
786
798
 
787
799
  declare module '@tiptap/core' {
788
800
  interface Commands<ReturnType> {
789
- attachment: {
790
- setAttachment: (attrs?: unknown) => ReturnType;
801
+ katex: {
802
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
791
803
  };
792
804
  }
793
805
  }
@@ -810,18 +822,8 @@ declare module '@tiptap/core' {
810
822
 
811
823
  declare module '@tiptap/core' {
812
824
  interface Commands<ReturnType> {
813
- katex: {
814
- setKatex: (arg?: IKatexAttrs) => ReturnType;
815
- };
816
- }
817
- }
818
-
819
-
820
- declare module '@tiptap/core' {
821
- interface Commands<ReturnType> {
822
- mermaid: {
823
- setMermaid: (options: any, replace?: any) => ReturnType;
824
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
825
+ exportWord: {
826
+ exportToWord: () => ReturnType;
825
827
  };
826
828
  }
827
829
  }
@@ -829,19 +831,9 @@ declare module '@tiptap/core' {
829
831
 
830
832
  declare module '@tiptap/core' {
831
833
  interface Commands<ReturnType> {
832
- imageGifUpload: {
833
- /**
834
- * Add an image gif
835
- */
836
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
837
- /**
838
- * Update an image gif
839
- */
840
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
841
- /**
842
- * Set image alignment
843
- */
844
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
834
+ tableOfContents: {
835
+ setTableOfContents: () => ReturnType;
836
+ removeTableOfContents: () => ReturnType;
845
837
  };
846
838
  }
847
839
  }
@@ -849,8 +841,8 @@ declare module '@tiptap/core' {
849
841
 
850
842
  declare module '@tiptap/core' {
851
843
  interface Commands<ReturnType> {
852
- exportWord: {
853
- exportToWord: () => ReturnType;
844
+ excalidraw: {
845
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
854
846
  };
855
847
  }
856
848
  }
@@ -858,11 +850,8 @@ declare module '@tiptap/core' {
858
850
 
859
851
  declare module '@tiptap/core' {
860
852
  interface Commands<ReturnType> {
861
- emoji: {
862
- setEmoji: (emoji: {
863
- name: string;
864
- emoji: string;
865
- }) => ReturnType;
853
+ attachment: {
854
+ setAttachment: (attrs?: unknown) => ReturnType;
866
855
  };
867
856
  }
868
857
  }
@@ -870,8 +859,19 @@ declare module '@tiptap/core' {
870
859
 
871
860
  declare module '@tiptap/core' {
872
861
  interface Commands<ReturnType> {
873
- painter: {
874
- setPainter: (marks: Mark[]) => ReturnType;
862
+ imageGifUpload: {
863
+ /**
864
+ * Add an image gif
865
+ */
866
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
867
+ /**
868
+ * Update an image gif
869
+ */
870
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
871
+ /**
872
+ * Set image alignment
873
+ */
874
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
875
875
  };
876
876
  }
877
877
  }
@@ -879,14 +879,14 @@ declare module '@tiptap/core' {
879
879
 
880
880
  declare module '@tiptap/core' {
881
881
  interface Commands<ReturnType> {
882
- iframe: {
882
+ twitter: {
883
883
  /**
884
- * Add an iframe
884
+ * Insert a tweet
885
+ * @param options The tweet attributes
886
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
885
887
  */
886
- setIframe: (options: {
887
- src: string;
888
- service: string;
889
- }) => ReturnType;
888
+ setTweet: (options: SetTweetOptions) => ReturnType;
889
+ updateTweet: (options: SetTweetOptions) => ReturnType;
890
890
  };
891
891
  }
892
892
  }
@@ -894,9 +894,9 @@ declare module '@tiptap/core' {
894
894
 
895
895
  declare module '@tiptap/core' {
896
896
  interface Commands<ReturnType> {
897
- tableOfContents: {
898
- setTableOfContents: () => ReturnType;
899
- removeTableOfContents: () => ReturnType;
897
+ mermaid: {
898
+ setMermaid: (options: any, replace?: any) => ReturnType;
899
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
900
900
  };
901
901
  }
902
902
  }
@@ -692,19 +692,15 @@ declare module '@tiptap/core' {
692
692
 
693
693
  declare module '@tiptap/core' {
694
694
  interface Commands<ReturnType> {
695
- imageUpload: {
696
- /**
697
- * Add an image
698
- */
699
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
695
+ indent: {
700
696
  /**
701
- * Update an image
697
+ * Set the indent attribute
702
698
  */
703
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
699
+ indent: () => ReturnType;
704
700
  /**
705
- * Set image alignment
701
+ * Set the outdent attribute
706
702
  */
707
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
703
+ outdent: () => ReturnType;
708
704
  };
709
705
  }
710
706
  }
@@ -722,15 +718,19 @@ declare module '@tiptap/core' {
722
718
 
723
719
  declare module '@tiptap/core' {
724
720
  interface Commands<ReturnType> {
725
- indent: {
721
+ imageUpload: {
726
722
  /**
727
- * Set the indent attribute
723
+ * Add an image
728
724
  */
729
- indent: () => ReturnType;
725
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
730
726
  /**
731
- * Set the outdent attribute
727
+ * Update an image
732
728
  */
733
- outdent: () => ReturnType;
729
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
730
+ /**
731
+ * Set image alignment
732
+ */
733
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
734
734
  };
735
735
  }
736
736
  }
@@ -738,9 +738,8 @@ declare module '@tiptap/core' {
738
738
 
739
739
  declare module '@tiptap/core' {
740
740
  interface Commands<ReturnType> {
741
- tableCellBackground: {
742
- setTableCellBackground: (color: string) => ReturnType;
743
- unsetTableCellBackground: () => ReturnType;
741
+ painter: {
742
+ setPainter: (marks: Mark[]) => ReturnType;
744
743
  };
745
744
  }
746
745
  }
@@ -748,14 +747,28 @@ declare module '@tiptap/core' {
748
747
 
749
748
  declare module '@tiptap/core' {
750
749
  interface Commands<ReturnType> {
751
- twitter: {
750
+ columns: {
751
+ insertColumns: (attrs?: {
752
+ cols: number;
753
+ }) => ReturnType;
754
+ addColBefore: () => ReturnType;
755
+ addColAfter: () => ReturnType;
756
+ deleteCol: () => ReturnType;
757
+ };
758
+ }
759
+ }
760
+
761
+
762
+ declare module '@tiptap/core' {
763
+ interface Commands<ReturnType> {
764
+ iframe: {
752
765
  /**
753
- * Insert a tweet
754
- * @param options The tweet attributes
755
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
766
+ * Add an iframe
756
767
  */
757
- setTweet: (options: SetTweetOptions) => ReturnType;
758
- updateTweet: (options: SetTweetOptions) => ReturnType;
768
+ setIframe: (options: {
769
+ src: string;
770
+ service: string;
771
+ }) => ReturnType;
759
772
  };
760
773
  }
761
774
  }
@@ -763,8 +776,9 @@ declare module '@tiptap/core' {
763
776
 
764
777
  declare module '@tiptap/core' {
765
778
  interface Commands<ReturnType> {
766
- excalidraw: {
767
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
779
+ tableCellBackground: {
780
+ setTableCellBackground: (color: string) => ReturnType;
781
+ unsetTableCellBackground: () => ReturnType;
768
782
  };
769
783
  }
770
784
  }
@@ -772,13 +786,11 @@ declare module '@tiptap/core' {
772
786
 
773
787
  declare module '@tiptap/core' {
774
788
  interface Commands<ReturnType> {
775
- columns: {
776
- insertColumns: (attrs?: {
777
- cols: number;
789
+ emoji: {
790
+ setEmoji: (emoji: {
791
+ name: string;
792
+ emoji: string;
778
793
  }) => ReturnType;
779
- addColBefore: () => ReturnType;
780
- addColAfter: () => ReturnType;
781
- deleteCol: () => ReturnType;
782
794
  };
783
795
  }
784
796
  }
@@ -786,8 +798,8 @@ declare module '@tiptap/core' {
786
798
 
787
799
  declare module '@tiptap/core' {
788
800
  interface Commands<ReturnType> {
789
- attachment: {
790
- setAttachment: (attrs?: unknown) => ReturnType;
801
+ katex: {
802
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
791
803
  };
792
804
  }
793
805
  }
@@ -810,18 +822,8 @@ declare module '@tiptap/core' {
810
822
 
811
823
  declare module '@tiptap/core' {
812
824
  interface Commands<ReturnType> {
813
- katex: {
814
- setKatex: (arg?: IKatexAttrs) => ReturnType;
815
- };
816
- }
817
- }
818
-
819
-
820
- declare module '@tiptap/core' {
821
- interface Commands<ReturnType> {
822
- mermaid: {
823
- setMermaid: (options: any, replace?: any) => ReturnType;
824
- setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
825
+ exportWord: {
826
+ exportToWord: () => ReturnType;
825
827
  };
826
828
  }
827
829
  }
@@ -829,19 +831,9 @@ declare module '@tiptap/core' {
829
831
 
830
832
  declare module '@tiptap/core' {
831
833
  interface Commands<ReturnType> {
832
- imageGifUpload: {
833
- /**
834
- * Add an image gif
835
- */
836
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
837
- /**
838
- * Update an image gif
839
- */
840
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
841
- /**
842
- * Set image alignment
843
- */
844
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
834
+ tableOfContents: {
835
+ setTableOfContents: () => ReturnType;
836
+ removeTableOfContents: () => ReturnType;
845
837
  };
846
838
  }
847
839
  }
@@ -849,8 +841,8 @@ declare module '@tiptap/core' {
849
841
 
850
842
  declare module '@tiptap/core' {
851
843
  interface Commands<ReturnType> {
852
- exportWord: {
853
- exportToWord: () => ReturnType;
844
+ excalidraw: {
845
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
854
846
  };
855
847
  }
856
848
  }
@@ -858,11 +850,8 @@ declare module '@tiptap/core' {
858
850
 
859
851
  declare module '@tiptap/core' {
860
852
  interface Commands<ReturnType> {
861
- emoji: {
862
- setEmoji: (emoji: {
863
- name: string;
864
- emoji: string;
865
- }) => ReturnType;
853
+ attachment: {
854
+ setAttachment: (attrs?: unknown) => ReturnType;
866
855
  };
867
856
  }
868
857
  }
@@ -870,8 +859,19 @@ declare module '@tiptap/core' {
870
859
 
871
860
  declare module '@tiptap/core' {
872
861
  interface Commands<ReturnType> {
873
- painter: {
874
- setPainter: (marks: Mark[]) => ReturnType;
862
+ imageGifUpload: {
863
+ /**
864
+ * Add an image gif
865
+ */
866
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
867
+ /**
868
+ * Update an image gif
869
+ */
870
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
871
+ /**
872
+ * Set image alignment
873
+ */
874
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
875
875
  };
876
876
  }
877
877
  }
@@ -879,14 +879,14 @@ declare module '@tiptap/core' {
879
879
 
880
880
  declare module '@tiptap/core' {
881
881
  interface Commands<ReturnType> {
882
- iframe: {
882
+ twitter: {
883
883
  /**
884
- * Add an iframe
884
+ * Insert a tweet
885
+ * @param options The tweet attributes
886
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
885
887
  */
886
- setIframe: (options: {
887
- src: string;
888
- service: string;
889
- }) => ReturnType;
888
+ setTweet: (options: SetTweetOptions) => ReturnType;
889
+ updateTweet: (options: SetTweetOptions) => ReturnType;
890
890
  };
891
891
  }
892
892
  }
@@ -894,9 +894,9 @@ declare module '@tiptap/core' {
894
894
 
895
895
  declare module '@tiptap/core' {
896
896
  interface Commands<ReturnType> {
897
- tableOfContents: {
898
- setTableOfContents: () => ReturnType;
899
- removeTableOfContents: () => ReturnType;
897
+ mermaid: {
898
+ setMermaid: (options: any, replace?: any) => ReturnType;
899
+ setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
900
900
  };
901
901
  }
902
902
  }