reactjs-tiptap-editor 0.2.22 → 0.2.24
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-CRJ-dSCW.cjs → RichTextEditor-CIhslsGV.cjs} +4 -4
- package/lib/{RichTextEditor-BnruDETn.js → RichTextEditor-C_dIT2FZ.js} +534 -534
- package/lib/extension-bundle.cjs +3 -3
- package/lib/extension-bundle.d.cts +70 -66
- package/lib/extension-bundle.d.ts +70 -66
- package/lib/extension-bundle.js +1275 -1217
- package/lib/{index-8id9bPv5.js → index-BlV5SJJW.js} +28 -42
- package/lib/index-CJ6Hb9MN.cjs +1 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +68 -59
- package/lib/index.d.ts +68 -59
- package/lib/index.js +2 -2
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.cts +68 -59
- package/lib/locale-bundle.d.ts +68 -59
- package/lib/locale-bundle.js +1 -1
- package/lib/style.css +1 -1
- package/lib/{tiptap-BV9BUpUC.js → tiptap-CXio79KB.js} +621 -768
- package/lib/tiptap-Dq62HiQ9.cjs +113 -0
- package/lib/vendor-DdwtMmSr.cjs +302 -0
- package/lib/{vendor-DyAqAGVt.js → vendor-VlEklMUJ.js} +15128 -11919
- package/package.json +23 -24
- package/lib/index-CYg22iLG.cjs +0 -1
- package/lib/tiptap-Ufn12SjW.cjs +0 -116
- package/lib/vendor-CRmKyn1B.cjs +0 -264
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useRef as d, useState as o, useEffect as f } from "react";
|
|
2
|
-
import { R as m } from "./RichTextEditor-
|
|
3
|
-
import { B as x } from "./tiptap-
|
|
2
|
+
import { R as m } from "./RichTextEditor-C_dIT2FZ.js";
|
|
3
|
+
import { B as x } from "./tiptap-CXio79KB.js";
|
|
4
4
|
function c() {
|
|
5
5
|
var t;
|
|
6
6
|
const e = d({ editor: null }), [u, s] = o(!1), [i, n] = o(null);
|
package/lib/locale-bundle.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CJ6Hb9MN.cjs");exports.en=e.locale$1;exports.hu_HU=e.locale$2;exports.locale=e.locale;exports.pt_BR=e.locale$5;exports.vi=e.locale$3;exports.zh_CN=e.locale$4;
|
package/lib/locale-bundle.d.cts
CHANGED
|
@@ -900,6 +900,15 @@ declare module '@tiptap/core' {
|
|
|
900
900
|
}
|
|
901
901
|
|
|
902
902
|
|
|
903
|
+
declare module '@tiptap/core' {
|
|
904
|
+
interface Commands<ReturnType> {
|
|
905
|
+
setCodeBlock: {
|
|
906
|
+
setCodeBlock: (options?: any) => ReturnType;
|
|
907
|
+
};
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
|
|
903
912
|
declare module '@tiptap/core' {
|
|
904
913
|
interface Commands<ReturnType> {
|
|
905
914
|
fontSize: {
|
|
@@ -918,6 +927,26 @@ declare module '@tiptap/core' {
|
|
|
918
927
|
}
|
|
919
928
|
|
|
920
929
|
|
|
930
|
+
declare module '@tiptap/core' {
|
|
931
|
+
interface Commands<ReturnType> {
|
|
932
|
+
imageUpload: {
|
|
933
|
+
/**
|
|
934
|
+
* Add an image
|
|
935
|
+
*/
|
|
936
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
937
|
+
/**
|
|
938
|
+
* Update an image
|
|
939
|
+
*/
|
|
940
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
941
|
+
/**
|
|
942
|
+
* Set image alignment
|
|
943
|
+
*/
|
|
944
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
945
|
+
};
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
|
|
921
950
|
declare module '@tiptap/core' {
|
|
922
951
|
interface Commands<ReturnType> {
|
|
923
952
|
indent: {
|
|
@@ -944,26 +973,6 @@ declare module '@tiptap/core' {
|
|
|
944
973
|
}
|
|
945
974
|
|
|
946
975
|
|
|
947
|
-
declare module '@tiptap/core' {
|
|
948
|
-
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;
|
|
962
|
-
};
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
|
|
967
976
|
declare module '@tiptap/core' {
|
|
968
977
|
interface Commands<ReturnType> {
|
|
969
978
|
tableCellBackground: {
|
|
@@ -1012,15 +1021,6 @@ declare module '@tiptap/core' {
|
|
|
1012
1021
|
}
|
|
1013
1022
|
|
|
1014
1023
|
|
|
1015
|
-
declare module '@tiptap/core' {
|
|
1016
|
-
interface Commands<ReturnType> {
|
|
1017
|
-
katex: {
|
|
1018
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
1019
|
-
};
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
1024
|
declare module '@tiptap/core' {
|
|
1025
1025
|
interface Commands<ReturnType> {
|
|
1026
1026
|
emoji: {
|
|
@@ -1050,8 +1050,9 @@ declare module '@tiptap/core' {
|
|
|
1050
1050
|
|
|
1051
1051
|
declare module '@tiptap/core' {
|
|
1052
1052
|
interface Commands<ReturnType> {
|
|
1053
|
-
|
|
1054
|
-
|
|
1053
|
+
tableOfContents: {
|
|
1054
|
+
setTableOfContents: () => ReturnType;
|
|
1055
|
+
removeTableOfContents: () => ReturnType;
|
|
1055
1056
|
};
|
|
1056
1057
|
}
|
|
1057
1058
|
}
|
|
@@ -1059,8 +1060,8 @@ declare module '@tiptap/core' {
|
|
|
1059
1060
|
|
|
1060
1061
|
declare module '@tiptap/core' {
|
|
1061
1062
|
interface Commands<ReturnType> {
|
|
1062
|
-
|
|
1063
|
-
|
|
1063
|
+
katex: {
|
|
1064
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
1064
1065
|
};
|
|
1065
1066
|
}
|
|
1066
1067
|
}
|
|
@@ -1068,9 +1069,8 @@ declare module '@tiptap/core' {
|
|
|
1068
1069
|
|
|
1069
1070
|
declare module '@tiptap/core' {
|
|
1070
1071
|
interface Commands<ReturnType> {
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
removeTableOfContents: () => ReturnType;
|
|
1072
|
+
exportWord: {
|
|
1073
|
+
exportToWord: () => ReturnType;
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
@@ -1078,8 +1078,19 @@ declare module '@tiptap/core' {
|
|
|
1078
1078
|
|
|
1079
1079
|
declare module '@tiptap/core' {
|
|
1080
1080
|
interface Commands<ReturnType> {
|
|
1081
|
-
|
|
1082
|
-
|
|
1081
|
+
imageGifUpload: {
|
|
1082
|
+
/**
|
|
1083
|
+
* Add an image gif
|
|
1084
|
+
*/
|
|
1085
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
1086
|
+
/**
|
|
1087
|
+
* Update an image gif
|
|
1088
|
+
*/
|
|
1089
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
1090
|
+
/**
|
|
1091
|
+
* Set image alignment
|
|
1092
|
+
*/
|
|
1093
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
1083
1094
|
};
|
|
1084
1095
|
}
|
|
1085
1096
|
}
|
|
@@ -1097,19 +1108,8 @@ declare module '@tiptap/core' {
|
|
|
1097
1108
|
|
|
1098
1109
|
declare module '@tiptap/core' {
|
|
1099
1110
|
interface Commands<ReturnType> {
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
* Add an image gif
|
|
1103
|
-
*/
|
|
1104
|
-
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
1105
|
-
/**
|
|
1106
|
-
* Update an image gif
|
|
1107
|
-
*/
|
|
1108
|
-
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
1109
|
-
/**
|
|
1110
|
-
* Set image alignment
|
|
1111
|
-
*/
|
|
1112
|
-
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
1111
|
+
attachment: {
|
|
1112
|
+
setAttachment: (attrs?: unknown) => ReturnType;
|
|
1113
1113
|
};
|
|
1114
1114
|
}
|
|
1115
1115
|
}
|
|
@@ -1117,14 +1117,8 @@ declare module '@tiptap/core' {
|
|
|
1117
1117
|
|
|
1118
1118
|
declare module '@tiptap/core' {
|
|
1119
1119
|
interface Commands<ReturnType> {
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
* Insert a tweet
|
|
1123
|
-
* @param options The tweet attributes
|
|
1124
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
1125
|
-
*/
|
|
1126
|
-
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
1127
|
-
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
1120
|
+
excalidraw: {
|
|
1121
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
1128
1122
|
};
|
|
1129
1123
|
}
|
|
1130
1124
|
}
|
|
@@ -1138,3 +1132,18 @@ declare module '@tiptap/core' {
|
|
|
1138
1132
|
};
|
|
1139
1133
|
}
|
|
1140
1134
|
}
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
declare module '@tiptap/core' {
|
|
1138
|
+
interface Commands<ReturnType> {
|
|
1139
|
+
twitter: {
|
|
1140
|
+
/**
|
|
1141
|
+
* Insert a tweet
|
|
1142
|
+
* @param options The tweet attributes
|
|
1143
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
1144
|
+
*/
|
|
1145
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
1146
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
1147
|
+
};
|
|
1148
|
+
}
|
|
1149
|
+
}
|
package/lib/locale-bundle.d.ts
CHANGED
|
@@ -900,6 +900,15 @@ declare module '@tiptap/core' {
|
|
|
900
900
|
}
|
|
901
901
|
|
|
902
902
|
|
|
903
|
+
declare module '@tiptap/core' {
|
|
904
|
+
interface Commands<ReturnType> {
|
|
905
|
+
setCodeBlock: {
|
|
906
|
+
setCodeBlock: (options?: any) => ReturnType;
|
|
907
|
+
};
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
|
|
903
912
|
declare module '@tiptap/core' {
|
|
904
913
|
interface Commands<ReturnType> {
|
|
905
914
|
fontSize: {
|
|
@@ -918,6 +927,26 @@ declare module '@tiptap/core' {
|
|
|
918
927
|
}
|
|
919
928
|
|
|
920
929
|
|
|
930
|
+
declare module '@tiptap/core' {
|
|
931
|
+
interface Commands<ReturnType> {
|
|
932
|
+
imageUpload: {
|
|
933
|
+
/**
|
|
934
|
+
* Add an image
|
|
935
|
+
*/
|
|
936
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
937
|
+
/**
|
|
938
|
+
* Update an image
|
|
939
|
+
*/
|
|
940
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
941
|
+
/**
|
|
942
|
+
* Set image alignment
|
|
943
|
+
*/
|
|
944
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
945
|
+
};
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
|
|
921
950
|
declare module '@tiptap/core' {
|
|
922
951
|
interface Commands<ReturnType> {
|
|
923
952
|
indent: {
|
|
@@ -944,26 +973,6 @@ declare module '@tiptap/core' {
|
|
|
944
973
|
}
|
|
945
974
|
|
|
946
975
|
|
|
947
|
-
declare module '@tiptap/core' {
|
|
948
|
-
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;
|
|
962
|
-
};
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
|
|
967
976
|
declare module '@tiptap/core' {
|
|
968
977
|
interface Commands<ReturnType> {
|
|
969
978
|
tableCellBackground: {
|
|
@@ -1012,15 +1021,6 @@ declare module '@tiptap/core' {
|
|
|
1012
1021
|
}
|
|
1013
1022
|
|
|
1014
1023
|
|
|
1015
|
-
declare module '@tiptap/core' {
|
|
1016
|
-
interface Commands<ReturnType> {
|
|
1017
|
-
katex: {
|
|
1018
|
-
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
1019
|
-
};
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
1024
|
declare module '@tiptap/core' {
|
|
1025
1025
|
interface Commands<ReturnType> {
|
|
1026
1026
|
emoji: {
|
|
@@ -1050,8 +1050,9 @@ declare module '@tiptap/core' {
|
|
|
1050
1050
|
|
|
1051
1051
|
declare module '@tiptap/core' {
|
|
1052
1052
|
interface Commands<ReturnType> {
|
|
1053
|
-
|
|
1054
|
-
|
|
1053
|
+
tableOfContents: {
|
|
1054
|
+
setTableOfContents: () => ReturnType;
|
|
1055
|
+
removeTableOfContents: () => ReturnType;
|
|
1055
1056
|
};
|
|
1056
1057
|
}
|
|
1057
1058
|
}
|
|
@@ -1059,8 +1060,8 @@ declare module '@tiptap/core' {
|
|
|
1059
1060
|
|
|
1060
1061
|
declare module '@tiptap/core' {
|
|
1061
1062
|
interface Commands<ReturnType> {
|
|
1062
|
-
|
|
1063
|
-
|
|
1063
|
+
katex: {
|
|
1064
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
1064
1065
|
};
|
|
1065
1066
|
}
|
|
1066
1067
|
}
|
|
@@ -1068,9 +1069,8 @@ declare module '@tiptap/core' {
|
|
|
1068
1069
|
|
|
1069
1070
|
declare module '@tiptap/core' {
|
|
1070
1071
|
interface Commands<ReturnType> {
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
removeTableOfContents: () => ReturnType;
|
|
1072
|
+
exportWord: {
|
|
1073
|
+
exportToWord: () => ReturnType;
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
@@ -1078,8 +1078,19 @@ declare module '@tiptap/core' {
|
|
|
1078
1078
|
|
|
1079
1079
|
declare module '@tiptap/core' {
|
|
1080
1080
|
interface Commands<ReturnType> {
|
|
1081
|
-
|
|
1082
|
-
|
|
1081
|
+
imageGifUpload: {
|
|
1082
|
+
/**
|
|
1083
|
+
* Add an image gif
|
|
1084
|
+
*/
|
|
1085
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
1086
|
+
/**
|
|
1087
|
+
* Update an image gif
|
|
1088
|
+
*/
|
|
1089
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
1090
|
+
/**
|
|
1091
|
+
* Set image alignment
|
|
1092
|
+
*/
|
|
1093
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
1083
1094
|
};
|
|
1084
1095
|
}
|
|
1085
1096
|
}
|
|
@@ -1097,19 +1108,8 @@ declare module '@tiptap/core' {
|
|
|
1097
1108
|
|
|
1098
1109
|
declare module '@tiptap/core' {
|
|
1099
1110
|
interface Commands<ReturnType> {
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
* Add an image gif
|
|
1103
|
-
*/
|
|
1104
|
-
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
1105
|
-
/**
|
|
1106
|
-
* Update an image gif
|
|
1107
|
-
*/
|
|
1108
|
-
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
1109
|
-
/**
|
|
1110
|
-
* Set image alignment
|
|
1111
|
-
*/
|
|
1112
|
-
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
1111
|
+
attachment: {
|
|
1112
|
+
setAttachment: (attrs?: unknown) => ReturnType;
|
|
1113
1113
|
};
|
|
1114
1114
|
}
|
|
1115
1115
|
}
|
|
@@ -1117,14 +1117,8 @@ declare module '@tiptap/core' {
|
|
|
1117
1117
|
|
|
1118
1118
|
declare module '@tiptap/core' {
|
|
1119
1119
|
interface Commands<ReturnType> {
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
* Insert a tweet
|
|
1123
|
-
* @param options The tweet attributes
|
|
1124
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
1125
|
-
*/
|
|
1126
|
-
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
1127
|
-
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
1120
|
+
excalidraw: {
|
|
1121
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
1128
1122
|
};
|
|
1129
1123
|
}
|
|
1130
1124
|
}
|
|
@@ -1138,3 +1132,18 @@ declare module '@tiptap/core' {
|
|
|
1138
1132
|
};
|
|
1139
1133
|
}
|
|
1140
1134
|
}
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
declare module '@tiptap/core' {
|
|
1138
|
+
interface Commands<ReturnType> {
|
|
1139
|
+
twitter: {
|
|
1140
|
+
/**
|
|
1141
|
+
* Insert a tweet
|
|
1142
|
+
* @param options The tweet attributes
|
|
1143
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
1144
|
+
*/
|
|
1145
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
1146
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
1147
|
+
};
|
|
1148
|
+
}
|
|
1149
|
+
}
|
package/lib/locale-bundle.js
CHANGED