@bbl-digital/snorre 4.0.99 → 4.0.100
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +12 -9
- package/esm/core/Editor/index.js +3 -0
- package/esm/core/QuillEditor/index.js +9 -9
- package/lib/core/Editor/index.d.ts +3 -0
- package/lib/core/Editor/index.d.ts.map +1 -1
- package/lib/core/Editor/index.js +3 -0
- package/lib/core/QuillEditor/index.js +9 -9
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
@@ -33001,6 +33001,9 @@
|
|
33001
33001
|
|
33002
33002
|
/** @jsxImportSource @emotion/react */
|
33003
33003
|
const TINYMCE_API_KEY = '1n4id0n4p67gr15sq9hvnk965wgh5ku8xjgqt30e2hnpccp3';
|
33004
|
+
/**
|
33005
|
+
* @deprecated Use QuillEditor instead
|
33006
|
+
*/
|
33004
33007
|
const Editor = ({
|
33005
33008
|
initialValue,
|
33006
33009
|
overrideValue,
|
@@ -35542,6 +35545,14 @@ to {top: 100vh;}
|
|
35542
35545
|
bounds,
|
35543
35546
|
readOnly
|
35544
35547
|
});
|
35548
|
+
if (initialValue !== undefined) {
|
35549
|
+
if (quillInstance.root.innerHTML !== initialValue) {
|
35550
|
+
const delta = quillInstance.clipboard.convert({
|
35551
|
+
html: initialValue
|
35552
|
+
});
|
35553
|
+
quillInstance.setContents(delta);
|
35554
|
+
}
|
35555
|
+
}
|
35545
35556
|
isMounted.current = true;
|
35546
35557
|
setQuill(quillInstance);
|
35547
35558
|
}
|
@@ -35566,14 +35577,6 @@ to {top: 100vh;}
|
|
35566
35577
|
});
|
35567
35578
|
}, [quill, pasteAsText]);
|
35568
35579
|
React.useEffect(() => {
|
35569
|
-
if (quill && initialValue !== undefined) {
|
35570
|
-
if (quill.root.innerHTML !== initialValue) {
|
35571
|
-
const delta = quill.clipboard.convert({
|
35572
|
-
html: initialValue
|
35573
|
-
});
|
35574
|
-
quill.setContents(delta);
|
35575
|
-
}
|
35576
|
-
}
|
35577
35580
|
if (quill && overrideValue !== undefined) {
|
35578
35581
|
if (quill.root.innerHTML !== overrideValue) {
|
35579
35582
|
const delta = quill.clipboard.convert({
|
@@ -35582,7 +35585,7 @@ to {top: 100vh;}
|
|
35582
35585
|
quill.setContents(delta);
|
35583
35586
|
}
|
35584
35587
|
}
|
35585
|
-
}, [quill,
|
35588
|
+
}, [quill, overrideValue]);
|
35586
35589
|
React.useEffect(() => {
|
35587
35590
|
if (quill && (disabled || readOnly)) {
|
35588
35591
|
quill.enable(false);
|
package/esm/core/Editor/index.js
CHANGED
@@ -11,6 +11,9 @@ import { useIsMobile } from '../../hooks/useIsMobile';
|
|
11
11
|
import { useEffect } from 'react';
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
13
13
|
const TINYMCE_API_KEY = '1n4id0n4p67gr15sq9hvnk965wgh5ku8xjgqt30e2hnpccp3';
|
14
|
+
/**
|
15
|
+
* @deprecated Use QuillEditor instead
|
16
|
+
*/
|
14
17
|
const Editor = ({
|
15
18
|
initialValue,
|
16
19
|
overrideValue,
|
@@ -148,6 +148,14 @@ const QuillEditor = ({
|
|
148
148
|
bounds,
|
149
149
|
readOnly
|
150
150
|
});
|
151
|
+
if (initialValue !== undefined) {
|
152
|
+
if (quillInstance.root.innerHTML !== initialValue) {
|
153
|
+
const delta = quillInstance.clipboard.convert({
|
154
|
+
html: initialValue
|
155
|
+
});
|
156
|
+
quillInstance.setContents(delta);
|
157
|
+
}
|
158
|
+
}
|
151
159
|
isMounted.current = true;
|
152
160
|
setQuill(quillInstance);
|
153
161
|
}
|
@@ -172,14 +180,6 @@ const QuillEditor = ({
|
|
172
180
|
});
|
173
181
|
}, [quill, pasteAsText]);
|
174
182
|
useEffect(() => {
|
175
|
-
if (quill && initialValue !== undefined) {
|
176
|
-
if (quill.root.innerHTML !== initialValue) {
|
177
|
-
const delta = quill.clipboard.convert({
|
178
|
-
html: initialValue
|
179
|
-
});
|
180
|
-
quill.setContents(delta);
|
181
|
-
}
|
182
|
-
}
|
183
183
|
if (quill && overrideValue !== undefined) {
|
184
184
|
if (quill.root.innerHTML !== overrideValue) {
|
185
185
|
const delta = quill.clipboard.convert({
|
@@ -188,7 +188,7 @@ const QuillEditor = ({
|
|
188
188
|
quill.setContents(delta);
|
189
189
|
}
|
190
190
|
}
|
191
|
-
}, [quill,
|
191
|
+
}, [quill, overrideValue]);
|
192
192
|
useEffect(() => {
|
193
193
|
if (quill && (disabled || readOnly)) {
|
194
194
|
quill.enable(false);
|
@@ -36,6 +36,9 @@ interface IProps {
|
|
36
36
|
/** Cb on change */
|
37
37
|
onChange: (value: string, plainTextLength: number) => void;
|
38
38
|
}
|
39
|
+
/**
|
40
|
+
* @deprecated Use QuillEditor instead
|
41
|
+
*/
|
39
42
|
declare const Editor: FC<IProps>;
|
40
43
|
export default Editor;
|
41
44
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Editor/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,EAAE,EAAE,EAAY,MAAM,OAAO,CAAA;AAiBpC,UAAU,MAAM;IACd,iBAAiB;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,wHAAwH;IACxH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,qCAAqC;IACrC,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;IAClC,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oBAAoB;IACpB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,OAAO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9C,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACzB,2EAA2E;IAC3E,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iBAAiB;IACjB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,mBAAmB;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,KAAK,IAAI,CAAA;CAC3D;AAGD;;GAEG;AACH,QAAA,MAAM,MAAM,EAAE,EAAE,CAAC,MAAM,CA+GtB,CAAA;AAED,eAAe,MAAM,CAAA"}
|
package/lib/core/Editor/index.js
CHANGED
@@ -11,6 +11,9 @@ import { useIsMobile } from '../../hooks/useIsMobile';
|
|
11
11
|
import { useEffect } from 'react';
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
13
13
|
const TINYMCE_API_KEY = '1n4id0n4p67gr15sq9hvnk965wgh5ku8xjgqt30e2hnpccp3';
|
14
|
+
/**
|
15
|
+
* @deprecated Use QuillEditor instead
|
16
|
+
*/
|
14
17
|
const Editor = ({
|
15
18
|
initialValue,
|
16
19
|
overrideValue,
|
@@ -148,6 +148,14 @@ const QuillEditor = ({
|
|
148
148
|
bounds,
|
149
149
|
readOnly
|
150
150
|
});
|
151
|
+
if (initialValue !== undefined) {
|
152
|
+
if (quillInstance.root.innerHTML !== initialValue) {
|
153
|
+
const delta = quillInstance.clipboard.convert({
|
154
|
+
html: initialValue
|
155
|
+
});
|
156
|
+
quillInstance.setContents(delta);
|
157
|
+
}
|
158
|
+
}
|
151
159
|
isMounted.current = true;
|
152
160
|
setQuill(quillInstance);
|
153
161
|
}
|
@@ -172,14 +180,6 @@ const QuillEditor = ({
|
|
172
180
|
});
|
173
181
|
}, [quill, pasteAsText]);
|
174
182
|
useEffect(() => {
|
175
|
-
if (quill && initialValue !== undefined) {
|
176
|
-
if (quill.root.innerHTML !== initialValue) {
|
177
|
-
const delta = quill.clipboard.convert({
|
178
|
-
html: initialValue
|
179
|
-
});
|
180
|
-
quill.setContents(delta);
|
181
|
-
}
|
182
|
-
}
|
183
183
|
if (quill && overrideValue !== undefined) {
|
184
184
|
if (quill.root.innerHTML !== overrideValue) {
|
185
185
|
const delta = quill.clipboard.convert({
|
@@ -188,7 +188,7 @@ const QuillEditor = ({
|
|
188
188
|
quill.setContents(delta);
|
189
189
|
}
|
190
190
|
}
|
191
|
-
}, [quill,
|
191
|
+
}, [quill, overrideValue]);
|
192
192
|
useEffect(() => {
|
193
193
|
if (quill && (disabled || readOnly)) {
|
194
194
|
quill.enable(false);
|