@bbl-digital/snorre 4.1.10 → 4.1.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.
package/dist/bundle.js
CHANGED
|
@@ -35538,9 +35538,11 @@ to {top: 100vh;}
|
|
|
35538
35538
|
}
|
|
35539
35539
|
};
|
|
35540
35540
|
const handleChange = React.useCallback((delta, _oldDelta, source) => {
|
|
35541
|
-
if (quill
|
|
35541
|
+
if (quill) {
|
|
35542
35542
|
const html = quill.root.innerHTML;
|
|
35543
|
-
onChange
|
|
35543
|
+
if (onChange) {
|
|
35544
|
+
onChange(html, delta, source, quill);
|
|
35545
|
+
}
|
|
35544
35546
|
}
|
|
35545
35547
|
}, [quill, onChange]);
|
|
35546
35548
|
const handelFocus = React.useCallback(() => {
|
|
@@ -35608,15 +35610,13 @@ to {top: 100vh;}
|
|
|
35608
35610
|
}, []);
|
|
35609
35611
|
React.useEffect(() => {
|
|
35610
35612
|
if (!quill) return;
|
|
35611
|
-
|
|
35613
|
+
const handleBlur = () => {
|
|
35612
35614
|
const html = quill.root.innerHTML;
|
|
35613
35615
|
onBlur && onBlur(html);
|
|
35614
|
-
}
|
|
35616
|
+
};
|
|
35617
|
+
quill.root.addEventListener('blur', handleBlur);
|
|
35615
35618
|
return () => {
|
|
35616
|
-
quill.root.removeEventListener('blur',
|
|
35617
|
-
const html = quill.root.innerHTML;
|
|
35618
|
-
onBlur && onBlur(html);
|
|
35619
|
-
});
|
|
35619
|
+
quill.root.removeEventListener('blur', handleBlur);
|
|
35620
35620
|
};
|
|
35621
35621
|
}, [quill]);
|
|
35622
35622
|
React.useEffect(() => {
|
|
@@ -35657,7 +35657,8 @@ to {top: 100vh;}
|
|
|
35657
35657
|
}, [quill, pasteAsText]);
|
|
35658
35658
|
React.useEffect(() => {
|
|
35659
35659
|
if (quill && overrideValue !== undefined) {
|
|
35660
|
-
|
|
35660
|
+
const currentContent = quill.root.innerHTML;
|
|
35661
|
+
if (currentContent !== overrideValue) {
|
|
35661
35662
|
const delta = quill.clipboard.convert({
|
|
35662
35663
|
html: overrideValue
|
|
35663
35664
|
});
|
|
@@ -135,9 +135,11 @@ const QuillEditor = ({
|
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
137
|
const handleChange = useCallback((delta, _oldDelta, source) => {
|
|
138
|
-
if (quill
|
|
138
|
+
if (quill) {
|
|
139
139
|
const html = quill.root.innerHTML;
|
|
140
|
-
onChange
|
|
140
|
+
if (onChange) {
|
|
141
|
+
onChange(html, delta, source, quill);
|
|
142
|
+
}
|
|
141
143
|
}
|
|
142
144
|
}, [quill, onChange]);
|
|
143
145
|
const handelFocus = useCallback(() => {
|
|
@@ -205,15 +207,13 @@ const QuillEditor = ({
|
|
|
205
207
|
}, []);
|
|
206
208
|
useEffect(() => {
|
|
207
209
|
if (!quill) return;
|
|
208
|
-
|
|
210
|
+
const handleBlur = () => {
|
|
209
211
|
const html = quill.root.innerHTML;
|
|
210
212
|
onBlur && onBlur(html);
|
|
211
|
-
}
|
|
213
|
+
};
|
|
214
|
+
quill.root.addEventListener('blur', handleBlur);
|
|
212
215
|
return () => {
|
|
213
|
-
quill.root.removeEventListener('blur',
|
|
214
|
-
const html = quill.root.innerHTML;
|
|
215
|
-
onBlur && onBlur(html);
|
|
216
|
-
});
|
|
216
|
+
quill.root.removeEventListener('blur', handleBlur);
|
|
217
217
|
};
|
|
218
218
|
}, [quill]);
|
|
219
219
|
useEffect(() => {
|
|
@@ -254,7 +254,8 @@ const QuillEditor = ({
|
|
|
254
254
|
}, [quill, pasteAsText]);
|
|
255
255
|
useEffect(() => {
|
|
256
256
|
if (quill && overrideValue !== undefined) {
|
|
257
|
-
|
|
257
|
+
const currentContent = quill.root.innerHTML;
|
|
258
|
+
if (currentContent !== overrideValue) {
|
|
258
259
|
const delta = quill.clipboard.convert({
|
|
259
260
|
html: overrideValue
|
|
260
261
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/QuillEditor/index.tsx"],"names":[],"mappings":"AAGA,OAAO,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AA+D3C,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/QuillEditor/index.tsx"],"names":[],"mappings":"AAGA,OAAO,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AA+D3C,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAoR3C,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -135,9 +135,11 @@ const QuillEditor = ({
|
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
137
|
const handleChange = useCallback((delta, _oldDelta, source) => {
|
|
138
|
-
if (quill
|
|
138
|
+
if (quill) {
|
|
139
139
|
const html = quill.root.innerHTML;
|
|
140
|
-
onChange
|
|
140
|
+
if (onChange) {
|
|
141
|
+
onChange(html, delta, source, quill);
|
|
142
|
+
}
|
|
141
143
|
}
|
|
142
144
|
}, [quill, onChange]);
|
|
143
145
|
const handelFocus = useCallback(() => {
|
|
@@ -205,15 +207,13 @@ const QuillEditor = ({
|
|
|
205
207
|
}, []);
|
|
206
208
|
useEffect(() => {
|
|
207
209
|
if (!quill) return;
|
|
208
|
-
|
|
210
|
+
const handleBlur = () => {
|
|
209
211
|
const html = quill.root.innerHTML;
|
|
210
212
|
onBlur && onBlur(html);
|
|
211
|
-
}
|
|
213
|
+
};
|
|
214
|
+
quill.root.addEventListener('blur', handleBlur);
|
|
212
215
|
return () => {
|
|
213
|
-
quill.root.removeEventListener('blur',
|
|
214
|
-
const html = quill.root.innerHTML;
|
|
215
|
-
onBlur && onBlur(html);
|
|
216
|
-
});
|
|
216
|
+
quill.root.removeEventListener('blur', handleBlur);
|
|
217
217
|
};
|
|
218
218
|
}, [quill]);
|
|
219
219
|
useEffect(() => {
|
|
@@ -254,7 +254,8 @@ const QuillEditor = ({
|
|
|
254
254
|
}, [quill, pasteAsText]);
|
|
255
255
|
useEffect(() => {
|
|
256
256
|
if (quill && overrideValue !== undefined) {
|
|
257
|
-
|
|
257
|
+
const currentContent = quill.root.innerHTML;
|
|
258
|
+
if (currentContent !== overrideValue) {
|
|
258
259
|
const delta = quill.clipboard.convert({
|
|
259
260
|
html: overrideValue
|
|
260
261
|
});
|