reactjs-tiptap-editor 0.2.10 → 0.2.11

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.
@@ -920,25 +920,9 @@ declare module '@tiptap/core' {
920
920
 
921
921
  declare module '@tiptap/core' {
922
922
  interface Commands<ReturnType> {
923
- lineHeight: {
924
- setLineHeight: (lineHeight: string) => ReturnType;
925
- unsetLineHeight: () => ReturnType;
926
- };
927
- }
928
- }
929
-
930
-
931
- declare module '@tiptap/core' {
932
- interface Commands<ReturnType> {
933
- indent: {
934
- /**
935
- * Set the indent attribute
936
- */
937
- indent: () => ReturnType;
938
- /**
939
- * Set the outdent attribute
940
- */
941
- outdent: () => ReturnType;
923
+ tableCellBackground: {
924
+ setTableCellBackground: (color: string) => ReturnType;
925
+ unsetTableCellBackground: () => ReturnType;
942
926
  };
943
927
  }
944
928
  }
@@ -946,19 +930,8 @@ declare module '@tiptap/core' {
946
930
 
947
931
  declare module '@tiptap/core' {
948
932
  interface Commands<ReturnType> {
949
- imageUpload: {
950
- /**
951
- * Add an image
952
- */
953
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
954
- /**
955
- * Update an image
956
- */
957
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
958
- /**
959
- * Set image alignment
960
- */
961
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
933
+ painter: {
934
+ setPainter: (marks: Mark[]) => ReturnType;
962
935
  };
963
936
  }
964
937
  }
@@ -980,24 +953,15 @@ declare module '@tiptap/core' {
980
953
 
981
954
  declare module '@tiptap/core' {
982
955
  interface Commands<ReturnType> {
983
- tableCellBackground: {
984
- setTableCellBackground: (color: string) => ReturnType;
985
- unsetTableCellBackground: () => ReturnType;
986
- };
987
- }
988
- }
989
-
990
-
991
- declare module '@tiptap/core' {
992
- interface Commands<ReturnType> {
993
- search: {
994
- setSearchTerm: (searchTerm: string) => ReturnType;
995
- setReplaceTerm: (replaceTerm: string) => ReturnType;
996
- replace: () => ReturnType;
997
- replaceAll: () => ReturnType;
998
- goToPrevSearchResult: () => void;
999
- goToNextSearchResult: () => void;
1000
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
956
+ indent: {
957
+ /**
958
+ * Set the indent attribute
959
+ */
960
+ indent: () => ReturnType;
961
+ /**
962
+ * Set the outdent attribute
963
+ */
964
+ outdent: () => ReturnType;
1001
965
  };
1002
966
  }
1003
967
  }
@@ -1005,8 +969,9 @@ declare module '@tiptap/core' {
1005
969
 
1006
970
  declare module '@tiptap/core' {
1007
971
  interface Commands<ReturnType> {
1008
- painter: {
1009
- setPainter: (marks: Mark[]) => ReturnType;
972
+ lineHeight: {
973
+ setLineHeight: (lineHeight: string) => ReturnType;
974
+ unsetLineHeight: () => ReturnType;
1010
975
  };
1011
976
  }
1012
977
  }
@@ -1014,8 +979,11 @@ declare module '@tiptap/core' {
1014
979
 
1015
980
  declare module '@tiptap/core' {
1016
981
  interface Commands<ReturnType> {
1017
- katex: {
1018
- setKatex: (arg?: IKatexAttrs) => ReturnType;
982
+ emoji: {
983
+ setEmoji: (emoji: {
984
+ name: string;
985
+ emoji: string;
986
+ }) => ReturnType;
1019
987
  };
1020
988
  }
1021
989
  }
@@ -1038,8 +1006,19 @@ declare module '@tiptap/core' {
1038
1006
 
1039
1007
  declare module '@tiptap/core' {
1040
1008
  interface Commands<ReturnType> {
1041
- exportWord: {
1042
- exportToWord: () => ReturnType;
1009
+ imageUpload: {
1010
+ /**
1011
+ * Add an image
1012
+ */
1013
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1014
+ /**
1015
+ * Update an image
1016
+ */
1017
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1018
+ /**
1019
+ * Set image alignment
1020
+ */
1021
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
1043
1022
  };
1044
1023
  }
1045
1024
  }
@@ -1047,9 +1026,14 @@ declare module '@tiptap/core' {
1047
1026
 
1048
1027
  declare module '@tiptap/core' {
1049
1028
  interface Commands<ReturnType> {
1050
- tableOfContents: {
1051
- setTableOfContents: () => ReturnType;
1052
- removeTableOfContents: () => ReturnType;
1029
+ search: {
1030
+ setSearchTerm: (searchTerm: string) => ReturnType;
1031
+ setReplaceTerm: (replaceTerm: string) => ReturnType;
1032
+ replace: () => ReturnType;
1033
+ replaceAll: () => ReturnType;
1034
+ goToPrevSearchResult: () => void;
1035
+ goToNextSearchResult: () => void;
1036
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
1053
1037
  };
1054
1038
  }
1055
1039
  }
@@ -1057,11 +1041,8 @@ declare module '@tiptap/core' {
1057
1041
 
1058
1042
  declare module '@tiptap/core' {
1059
1043
  interface Commands<ReturnType> {
1060
- emoji: {
1061
- setEmoji: (emoji: {
1062
- name: string;
1063
- emoji: string;
1064
- }) => ReturnType;
1044
+ katex: {
1045
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
1065
1046
  };
1066
1047
  }
1067
1048
  }
@@ -1069,8 +1050,8 @@ declare module '@tiptap/core' {
1069
1050
 
1070
1051
  declare module '@tiptap/core' {
1071
1052
  interface Commands<ReturnType> {
1072
- excalidraw: {
1073
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1053
+ exportWord: {
1054
+ exportToWord: () => ReturnType;
1074
1055
  };
1075
1056
  }
1076
1057
  }
@@ -1078,9 +1059,9 @@ declare module '@tiptap/core' {
1078
1059
 
1079
1060
  declare module '@tiptap/core' {
1080
1061
  interface Commands<ReturnType> {
1081
- drawer: {
1082
- setDrawer: (options: any, replace?: any) => ReturnType;
1083
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
1062
+ tableOfContents: {
1063
+ setTableOfContents: () => ReturnType;
1064
+ removeTableOfContents: () => ReturnType;
1084
1065
  };
1085
1066
  }
1086
1067
  }
@@ -1088,8 +1069,8 @@ declare module '@tiptap/core' {
1088
1069
 
1089
1070
  declare module '@tiptap/core' {
1090
1071
  interface Commands<ReturnType> {
1091
- attachment: {
1092
- setAttachment: (attrs?: unknown) => ReturnType;
1072
+ excalidraw: {
1073
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1093
1074
  };
1094
1075
  }
1095
1076
  }
@@ -1097,14 +1078,8 @@ declare module '@tiptap/core' {
1097
1078
 
1098
1079
  declare module '@tiptap/core' {
1099
1080
  interface Commands<ReturnType> {
1100
- twitter: {
1101
- /**
1102
- * Insert a tweet
1103
- * @param options The tweet attributes
1104
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1105
- */
1106
- setTweet: (options: SetTweetOptions) => ReturnType;
1107
- updateTweet: (options: SetTweetOptions) => ReturnType;
1081
+ attachment: {
1082
+ setAttachment: (attrs?: unknown) => ReturnType;
1108
1083
  };
1109
1084
  }
1110
1085
  }
@@ -1130,6 +1105,31 @@ declare module '@tiptap/core' {
1130
1105
  }
1131
1106
 
1132
1107
 
1108
+ declare module '@tiptap/core' {
1109
+ interface Commands<ReturnType> {
1110
+ twitter: {
1111
+ /**
1112
+ * Insert a tweet
1113
+ * @param options The tweet attributes
1114
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1115
+ */
1116
+ setTweet: (options: SetTweetOptions) => ReturnType;
1117
+ updateTweet: (options: SetTweetOptions) => ReturnType;
1118
+ };
1119
+ }
1120
+ }
1121
+
1122
+
1123
+ declare module '@tiptap/core' {
1124
+ interface Commands<ReturnType> {
1125
+ drawer: {
1126
+ setDrawer: (options: any, replace?: any) => ReturnType;
1127
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
1128
+ };
1129
+ }
1130
+ }
1131
+
1132
+
1133
1133
  declare module '@tiptap/core' {
1134
1134
  interface Commands<ReturnType> {
1135
1135
  mermaid: {
@@ -920,25 +920,9 @@ declare module '@tiptap/core' {
920
920
 
921
921
  declare module '@tiptap/core' {
922
922
  interface Commands<ReturnType> {
923
- lineHeight: {
924
- setLineHeight: (lineHeight: string) => ReturnType;
925
- unsetLineHeight: () => ReturnType;
926
- };
927
- }
928
- }
929
-
930
-
931
- declare module '@tiptap/core' {
932
- interface Commands<ReturnType> {
933
- indent: {
934
- /**
935
- * Set the indent attribute
936
- */
937
- indent: () => ReturnType;
938
- /**
939
- * Set the outdent attribute
940
- */
941
- outdent: () => ReturnType;
923
+ tableCellBackground: {
924
+ setTableCellBackground: (color: string) => ReturnType;
925
+ unsetTableCellBackground: () => ReturnType;
942
926
  };
943
927
  }
944
928
  }
@@ -946,19 +930,8 @@ declare module '@tiptap/core' {
946
930
 
947
931
  declare module '@tiptap/core' {
948
932
  interface Commands<ReturnType> {
949
- imageUpload: {
950
- /**
951
- * Add an image
952
- */
953
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
954
- /**
955
- * Update an image
956
- */
957
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
958
- /**
959
- * Set image alignment
960
- */
961
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
933
+ painter: {
934
+ setPainter: (marks: Mark[]) => ReturnType;
962
935
  };
963
936
  }
964
937
  }
@@ -980,24 +953,15 @@ declare module '@tiptap/core' {
980
953
 
981
954
  declare module '@tiptap/core' {
982
955
  interface Commands<ReturnType> {
983
- tableCellBackground: {
984
- setTableCellBackground: (color: string) => ReturnType;
985
- unsetTableCellBackground: () => ReturnType;
986
- };
987
- }
988
- }
989
-
990
-
991
- declare module '@tiptap/core' {
992
- interface Commands<ReturnType> {
993
- search: {
994
- setSearchTerm: (searchTerm: string) => ReturnType;
995
- setReplaceTerm: (replaceTerm: string) => ReturnType;
996
- replace: () => ReturnType;
997
- replaceAll: () => ReturnType;
998
- goToPrevSearchResult: () => void;
999
- goToNextSearchResult: () => void;
1000
- setCaseSensitive: (caseSensitive: boolean) => ReturnType;
956
+ indent: {
957
+ /**
958
+ * Set the indent attribute
959
+ */
960
+ indent: () => ReturnType;
961
+ /**
962
+ * Set the outdent attribute
963
+ */
964
+ outdent: () => ReturnType;
1001
965
  };
1002
966
  }
1003
967
  }
@@ -1005,8 +969,9 @@ declare module '@tiptap/core' {
1005
969
 
1006
970
  declare module '@tiptap/core' {
1007
971
  interface Commands<ReturnType> {
1008
- painter: {
1009
- setPainter: (marks: Mark[]) => ReturnType;
972
+ lineHeight: {
973
+ setLineHeight: (lineHeight: string) => ReturnType;
974
+ unsetLineHeight: () => ReturnType;
1010
975
  };
1011
976
  }
1012
977
  }
@@ -1014,8 +979,11 @@ declare module '@tiptap/core' {
1014
979
 
1015
980
  declare module '@tiptap/core' {
1016
981
  interface Commands<ReturnType> {
1017
- katex: {
1018
- setKatex: (arg?: IKatexAttrs) => ReturnType;
982
+ emoji: {
983
+ setEmoji: (emoji: {
984
+ name: string;
985
+ emoji: string;
986
+ }) => ReturnType;
1019
987
  };
1020
988
  }
1021
989
  }
@@ -1038,8 +1006,19 @@ declare module '@tiptap/core' {
1038
1006
 
1039
1007
  declare module '@tiptap/core' {
1040
1008
  interface Commands<ReturnType> {
1041
- exportWord: {
1042
- exportToWord: () => ReturnType;
1009
+ imageUpload: {
1010
+ /**
1011
+ * Add an image
1012
+ */
1013
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1014
+ /**
1015
+ * Update an image
1016
+ */
1017
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
1018
+ /**
1019
+ * Set image alignment
1020
+ */
1021
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
1043
1022
  };
1044
1023
  }
1045
1024
  }
@@ -1047,9 +1026,14 @@ declare module '@tiptap/core' {
1047
1026
 
1048
1027
  declare module '@tiptap/core' {
1049
1028
  interface Commands<ReturnType> {
1050
- tableOfContents: {
1051
- setTableOfContents: () => ReturnType;
1052
- removeTableOfContents: () => ReturnType;
1029
+ search: {
1030
+ setSearchTerm: (searchTerm: string) => ReturnType;
1031
+ setReplaceTerm: (replaceTerm: string) => ReturnType;
1032
+ replace: () => ReturnType;
1033
+ replaceAll: () => ReturnType;
1034
+ goToPrevSearchResult: () => void;
1035
+ goToNextSearchResult: () => void;
1036
+ setCaseSensitive: (caseSensitive: boolean) => ReturnType;
1053
1037
  };
1054
1038
  }
1055
1039
  }
@@ -1057,11 +1041,8 @@ declare module '@tiptap/core' {
1057
1041
 
1058
1042
  declare module '@tiptap/core' {
1059
1043
  interface Commands<ReturnType> {
1060
- emoji: {
1061
- setEmoji: (emoji: {
1062
- name: string;
1063
- emoji: string;
1064
- }) => ReturnType;
1044
+ katex: {
1045
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
1065
1046
  };
1066
1047
  }
1067
1048
  }
@@ -1069,8 +1050,8 @@ declare module '@tiptap/core' {
1069
1050
 
1070
1051
  declare module '@tiptap/core' {
1071
1052
  interface Commands<ReturnType> {
1072
- excalidraw: {
1073
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1053
+ exportWord: {
1054
+ exportToWord: () => ReturnType;
1074
1055
  };
1075
1056
  }
1076
1057
  }
@@ -1078,9 +1059,9 @@ declare module '@tiptap/core' {
1078
1059
 
1079
1060
  declare module '@tiptap/core' {
1080
1061
  interface Commands<ReturnType> {
1081
- drawer: {
1082
- setDrawer: (options: any, replace?: any) => ReturnType;
1083
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
1062
+ tableOfContents: {
1063
+ setTableOfContents: () => ReturnType;
1064
+ removeTableOfContents: () => ReturnType;
1084
1065
  };
1085
1066
  }
1086
1067
  }
@@ -1088,8 +1069,8 @@ declare module '@tiptap/core' {
1088
1069
 
1089
1070
  declare module '@tiptap/core' {
1090
1071
  interface Commands<ReturnType> {
1091
- attachment: {
1092
- setAttachment: (attrs?: unknown) => ReturnType;
1072
+ excalidraw: {
1073
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
1093
1074
  };
1094
1075
  }
1095
1076
  }
@@ -1097,14 +1078,8 @@ declare module '@tiptap/core' {
1097
1078
 
1098
1079
  declare module '@tiptap/core' {
1099
1080
  interface Commands<ReturnType> {
1100
- twitter: {
1101
- /**
1102
- * Insert a tweet
1103
- * @param options The tweet attributes
1104
- * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1105
- */
1106
- setTweet: (options: SetTweetOptions) => ReturnType;
1107
- updateTweet: (options: SetTweetOptions) => ReturnType;
1081
+ attachment: {
1082
+ setAttachment: (attrs?: unknown) => ReturnType;
1108
1083
  };
1109
1084
  }
1110
1085
  }
@@ -1130,6 +1105,31 @@ declare module '@tiptap/core' {
1130
1105
  }
1131
1106
 
1132
1107
 
1108
+ declare module '@tiptap/core' {
1109
+ interface Commands<ReturnType> {
1110
+ twitter: {
1111
+ /**
1112
+ * Insert a tweet
1113
+ * @param options The tweet attributes
1114
+ * @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
1115
+ */
1116
+ setTweet: (options: SetTweetOptions) => ReturnType;
1117
+ updateTweet: (options: SetTweetOptions) => ReturnType;
1118
+ };
1119
+ }
1120
+ }
1121
+
1122
+
1123
+ declare module '@tiptap/core' {
1124
+ interface Commands<ReturnType> {
1125
+ drawer: {
1126
+ setDrawer: (options: any, replace?: any) => ReturnType;
1127
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
1128
+ };
1129
+ }
1130
+ }
1131
+
1132
+
1133
1133
  declare module '@tiptap/core' {
1134
1134
  interface Commands<ReturnType> {
1135
1135
  mermaid: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "reactjs-tiptap-editor",
3
3
  "type": "module",
4
- "version": "0.2.10",
4
+ "version": "0.2.11",
5
5
  "packageManager": "pnpm@8.15.9",
6
6
  "description": "A modern WYSIWYG rich text editor based on tiptap and shadcn ui for React",
7
7
  "license": "MIT",
@@ -189,7 +189,6 @@
189
189
  "react-tweet": "^3.2.2",
190
190
  "react-visibility-sensor": "^5.1.1",
191
191
  "reactjs-signal": "^1.1.3",
192
- "reactjs-tiptap-editor": "workspace:^",
193
192
  "scroll-into-view-if-needed": "^3.1.0",
194
193
  "shiki": "^1.29.2",
195
194
  "svg64": "^2.0.0",