reactjs-tiptap-editor 0.2.13 → 0.2.14

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.
@@ -698,6 +698,16 @@ declare module '@tiptap/core' {
698
698
  }
699
699
 
700
700
 
701
+ declare module '@tiptap/core' {
702
+ interface Commands<ReturnType> {
703
+ lineHeight: {
704
+ setLineHeight: (lineHeight: string) => ReturnType;
705
+ unsetLineHeight: () => ReturnType;
706
+ };
707
+ }
708
+ }
709
+
710
+
701
711
  declare module '@tiptap/core' {
702
712
  interface Commands<ReturnType> {
703
713
  indent: {
@@ -716,9 +726,11 @@ declare module '@tiptap/core' {
716
726
 
717
727
  declare module '@tiptap/core' {
718
728
  interface Commands<ReturnType> {
719
- lineHeight: {
720
- setLineHeight: (lineHeight: string) => ReturnType;
721
- unsetLineHeight: () => ReturnType;
729
+ emoji: {
730
+ setEmoji: (emoji: {
731
+ name: string;
732
+ emoji: string;
733
+ }) => ReturnType;
722
734
  };
723
735
  }
724
736
  }
@@ -726,13 +738,19 @@ declare module '@tiptap/core' {
726
738
 
727
739
  declare module '@tiptap/core' {
728
740
  interface Commands<ReturnType> {
729
- columns: {
730
- insertColumns: (attrs?: {
731
- cols: number;
732
- }) => ReturnType;
733
- addColBefore: () => ReturnType;
734
- addColAfter: () => ReturnType;
735
- deleteCol: () => ReturnType;
741
+ imageUpload: {
742
+ /**
743
+ * Add an image
744
+ */
745
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
746
+ /**
747
+ * Update an image
748
+ */
749
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
750
+ /**
751
+ * Set image alignment
752
+ */
753
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
736
754
  };
737
755
  }
738
756
  }
@@ -740,9 +758,8 @@ declare module '@tiptap/core' {
740
758
 
741
759
  declare module '@tiptap/core' {
742
760
  interface Commands<ReturnType> {
743
- tableCellBackground: {
744
- setTableCellBackground: (color: string) => ReturnType;
745
- unsetTableCellBackground: () => ReturnType;
761
+ painter: {
762
+ setPainter: (marks: Mark[]) => ReturnType;
746
763
  };
747
764
  }
748
765
  }
@@ -750,14 +767,13 @@ declare module '@tiptap/core' {
750
767
 
751
768
  declare module '@tiptap/core' {
752
769
  interface Commands<ReturnType> {
753
- iframe: {
754
- /**
755
- * Add an iframe
756
- */
757
- setIframe: (options: {
758
- src: string;
759
- service: string;
770
+ columns: {
771
+ insertColumns: (attrs?: {
772
+ cols: number;
760
773
  }) => ReturnType;
774
+ addColBefore: () => ReturnType;
775
+ addColAfter: () => ReturnType;
776
+ deleteCol: () => ReturnType;
761
777
  };
762
778
  }
763
779
  }
@@ -765,19 +781,8 @@ declare module '@tiptap/core' {
765
781
 
766
782
  declare module '@tiptap/core' {
767
783
  interface Commands<ReturnType> {
768
- imageUpload: {
769
- /**
770
- * Add an image
771
- */
772
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
773
- /**
774
- * Update an image
775
- */
776
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
777
- /**
778
- * Set image alignment
779
- */
780
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
784
+ katex: {
785
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
781
786
  };
782
787
  }
783
788
  }
@@ -785,8 +790,9 @@ declare module '@tiptap/core' {
785
790
 
786
791
  declare module '@tiptap/core' {
787
792
  interface Commands<ReturnType> {
788
- painter: {
789
- setPainter: (marks: Mark[]) => ReturnType;
793
+ tableCellBackground: {
794
+ setTableCellBackground: (color: string) => ReturnType;
795
+ unsetTableCellBackground: () => ReturnType;
790
796
  };
791
797
  }
792
798
  }
@@ -794,8 +800,14 @@ declare module '@tiptap/core' {
794
800
 
795
801
  declare module '@tiptap/core' {
796
802
  interface Commands<ReturnType> {
797
- katex: {
798
- setKatex: (arg?: IKatexAttrs) => ReturnType;
803
+ iframe: {
804
+ /**
805
+ * Add an iframe
806
+ */
807
+ setIframe: (options: {
808
+ src: string;
809
+ service: string;
810
+ }) => ReturnType;
799
811
  };
800
812
  }
801
813
  }
@@ -837,11 +849,8 @@ declare module '@tiptap/core' {
837
849
 
838
850
  declare module '@tiptap/core' {
839
851
  interface Commands<ReturnType> {
840
- emoji: {
841
- setEmoji: (emoji: {
842
- name: string;
843
- emoji: string;
844
- }) => ReturnType;
852
+ excalidraw: {
853
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
845
854
  };
846
855
  }
847
856
  }
@@ -849,14 +858,8 @@ declare module '@tiptap/core' {
849
858
 
850
859
  declare module '@tiptap/core' {
851
860
  interface Commands<ReturnType> {
852
- twitter: {
853
- /**
854
- * Insert a tweet
855
- * @param options The tweet attributes
856
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
857
- */
858
- setTweet: (options: SetTweetOptions) => ReturnType;
859
- updateTweet: (options: SetTweetOptions) => ReturnType;
861
+ attachment: {
862
+ setAttachment: (attrs?: unknown) => ReturnType;
860
863
  };
861
864
  }
862
865
  }
@@ -864,8 +867,9 @@ declare module '@tiptap/core' {
864
867
 
865
868
  declare module '@tiptap/core' {
866
869
  interface Commands<ReturnType> {
867
- attachment: {
868
- setAttachment: (attrs?: unknown) => ReturnType;
870
+ drawer: {
871
+ setDrawer: (options: any, replace?: any) => ReturnType;
872
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
869
873
  };
870
874
  }
871
875
  }
@@ -893,18 +897,14 @@ declare module '@tiptap/core' {
893
897
 
894
898
  declare module '@tiptap/core' {
895
899
  interface Commands<ReturnType> {
896
- drawer: {
897
- setDrawer: (options: any, replace?: any) => ReturnType;
898
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
899
- };
900
- }
901
- }
902
-
903
-
904
- declare module '@tiptap/core' {
905
- interface Commands<ReturnType> {
906
- excalidraw: {
907
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
900
+ twitter: {
901
+ /**
902
+ * Insert a tweet
903
+ * @param options The tweet attributes
904
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
905
+ */
906
+ setTweet: (options: SetTweetOptions) => ReturnType;
907
+ updateTweet: (options: SetTweetOptions) => ReturnType;
908
908
  };
909
909
  }
910
910
  }
@@ -698,6 +698,16 @@ declare module '@tiptap/core' {
698
698
  }
699
699
 
700
700
 
701
+ declare module '@tiptap/core' {
702
+ interface Commands<ReturnType> {
703
+ lineHeight: {
704
+ setLineHeight: (lineHeight: string) => ReturnType;
705
+ unsetLineHeight: () => ReturnType;
706
+ };
707
+ }
708
+ }
709
+
710
+
701
711
  declare module '@tiptap/core' {
702
712
  interface Commands<ReturnType> {
703
713
  indent: {
@@ -716,9 +726,11 @@ declare module '@tiptap/core' {
716
726
 
717
727
  declare module '@tiptap/core' {
718
728
  interface Commands<ReturnType> {
719
- lineHeight: {
720
- setLineHeight: (lineHeight: string) => ReturnType;
721
- unsetLineHeight: () => ReturnType;
729
+ emoji: {
730
+ setEmoji: (emoji: {
731
+ name: string;
732
+ emoji: string;
733
+ }) => ReturnType;
722
734
  };
723
735
  }
724
736
  }
@@ -726,13 +738,19 @@ declare module '@tiptap/core' {
726
738
 
727
739
  declare module '@tiptap/core' {
728
740
  interface Commands<ReturnType> {
729
- columns: {
730
- insertColumns: (attrs?: {
731
- cols: number;
732
- }) => ReturnType;
733
- addColBefore: () => ReturnType;
734
- addColAfter: () => ReturnType;
735
- deleteCol: () => ReturnType;
741
+ imageUpload: {
742
+ /**
743
+ * Add an image
744
+ */
745
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
746
+ /**
747
+ * Update an image
748
+ */
749
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
750
+ /**
751
+ * Set image alignment
752
+ */
753
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
736
754
  };
737
755
  }
738
756
  }
@@ -740,9 +758,8 @@ declare module '@tiptap/core' {
740
758
 
741
759
  declare module '@tiptap/core' {
742
760
  interface Commands<ReturnType> {
743
- tableCellBackground: {
744
- setTableCellBackground: (color: string) => ReturnType;
745
- unsetTableCellBackground: () => ReturnType;
761
+ painter: {
762
+ setPainter: (marks: Mark[]) => ReturnType;
746
763
  };
747
764
  }
748
765
  }
@@ -750,14 +767,13 @@ declare module '@tiptap/core' {
750
767
 
751
768
  declare module '@tiptap/core' {
752
769
  interface Commands<ReturnType> {
753
- iframe: {
754
- /**
755
- * Add an iframe
756
- */
757
- setIframe: (options: {
758
- src: string;
759
- service: string;
770
+ columns: {
771
+ insertColumns: (attrs?: {
772
+ cols: number;
760
773
  }) => ReturnType;
774
+ addColBefore: () => ReturnType;
775
+ addColAfter: () => ReturnType;
776
+ deleteCol: () => ReturnType;
761
777
  };
762
778
  }
763
779
  }
@@ -765,19 +781,8 @@ declare module '@tiptap/core' {
765
781
 
766
782
  declare module '@tiptap/core' {
767
783
  interface Commands<ReturnType> {
768
- imageUpload: {
769
- /**
770
- * Add an image
771
- */
772
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
773
- /**
774
- * Update an image
775
- */
776
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
777
- /**
778
- * Set image alignment
779
- */
780
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
784
+ katex: {
785
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
781
786
  };
782
787
  }
783
788
  }
@@ -785,8 +790,9 @@ declare module '@tiptap/core' {
785
790
 
786
791
  declare module '@tiptap/core' {
787
792
  interface Commands<ReturnType> {
788
- painter: {
789
- setPainter: (marks: Mark[]) => ReturnType;
793
+ tableCellBackground: {
794
+ setTableCellBackground: (color: string) => ReturnType;
795
+ unsetTableCellBackground: () => ReturnType;
790
796
  };
791
797
  }
792
798
  }
@@ -794,8 +800,14 @@ declare module '@tiptap/core' {
794
800
 
795
801
  declare module '@tiptap/core' {
796
802
  interface Commands<ReturnType> {
797
- katex: {
798
- setKatex: (arg?: IKatexAttrs) => ReturnType;
803
+ iframe: {
804
+ /**
805
+ * Add an iframe
806
+ */
807
+ setIframe: (options: {
808
+ src: string;
809
+ service: string;
810
+ }) => ReturnType;
799
811
  };
800
812
  }
801
813
  }
@@ -837,11 +849,8 @@ declare module '@tiptap/core' {
837
849
 
838
850
  declare module '@tiptap/core' {
839
851
  interface Commands<ReturnType> {
840
- emoji: {
841
- setEmoji: (emoji: {
842
- name: string;
843
- emoji: string;
844
- }) => ReturnType;
852
+ excalidraw: {
853
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
845
854
  };
846
855
  }
847
856
  }
@@ -849,14 +858,8 @@ declare module '@tiptap/core' {
849
858
 
850
859
  declare module '@tiptap/core' {
851
860
  interface Commands<ReturnType> {
852
- twitter: {
853
- /**
854
- * Insert a tweet
855
- * @param options The tweet attributes
856
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
857
- */
858
- setTweet: (options: SetTweetOptions) => ReturnType;
859
- updateTweet: (options: SetTweetOptions) => ReturnType;
861
+ attachment: {
862
+ setAttachment: (attrs?: unknown) => ReturnType;
860
863
  };
861
864
  }
862
865
  }
@@ -864,8 +867,9 @@ declare module '@tiptap/core' {
864
867
 
865
868
  declare module '@tiptap/core' {
866
869
  interface Commands<ReturnType> {
867
- attachment: {
868
- setAttachment: (attrs?: unknown) => ReturnType;
870
+ drawer: {
871
+ setDrawer: (options: any, replace?: any) => ReturnType;
872
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
869
873
  };
870
874
  }
871
875
  }
@@ -893,18 +897,14 @@ declare module '@tiptap/core' {
893
897
 
894
898
  declare module '@tiptap/core' {
895
899
  interface Commands<ReturnType> {
896
- drawer: {
897
- setDrawer: (options: any, replace?: any) => ReturnType;
898
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
899
- };
900
- }
901
- }
902
-
903
-
904
- declare module '@tiptap/core' {
905
- interface Commands<ReturnType> {
906
- excalidraw: {
907
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
900
+ twitter: {
901
+ /**
902
+ * Insert a tweet
903
+ * @param options The tweet attributes
904
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
905
+ */
906
+ setTweet: (options: SetTweetOptions) => ReturnType;
907
+ updateTweet: (options: SetTweetOptions) => ReturnType;
908
908
  };
909
909
  }
910
910
  }