@bbl-digital/snorre 4.1.13 → 4.1.14
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +43 -49
- package/esm/core/QuillEditor/index.js +43 -49
- package/lib/core/QuillEditor/index.d.ts.map +1 -1
- package/lib/core/QuillEditor/index.js +43 -49
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
@@ -35610,8 +35610,12 @@ to {top: 100vh;}
|
|
35610
35610
|
}
|
35611
35611
|
quillInstance.on(Quill__default["default"].events.TEXT_CHANGE, (...args) => handleChange(...args, quillInstance));
|
35612
35612
|
quillInstance.on(Quill__default["default"].events.SELECTION_CHANGE, range => {
|
35613
|
-
|
35614
|
-
|
35613
|
+
const html = quillInstance.root.innerHTML;
|
35614
|
+
if (!range) {
|
35615
|
+
handelFocus?.(quillInstance);
|
35616
|
+
} else {
|
35617
|
+
onBlur?.(html);
|
35618
|
+
}
|
35615
35619
|
});
|
35616
35620
|
isMounted.current = true;
|
35617
35621
|
setQuill(quillInstance);
|
@@ -35620,53 +35624,43 @@ to {top: 100vh;}
|
|
35620
35624
|
container.innerHTML = '';
|
35621
35625
|
};
|
35622
35626
|
}, [ref]);
|
35623
|
-
|
35624
|
-
|
35625
|
-
|
35626
|
-
|
35627
|
-
|
35628
|
-
|
35629
|
-
|
35630
|
-
|
35631
|
-
|
35632
|
-
|
35633
|
-
|
35634
|
-
|
35635
|
-
}
|
35636
|
-
|
35637
|
-
|
35638
|
-
|
35639
|
-
|
35640
|
-
|
35641
|
-
|
35642
|
-
|
35643
|
-
|
35644
|
-
|
35645
|
-
|
35646
|
-
|
35647
|
-
|
35648
|
-
|
35649
|
-
|
35650
|
-
|
35651
|
-
|
35652
|
-
|
35653
|
-
|
35654
|
-
|
35655
|
-
|
35656
|
-
|
35657
|
-
|
35658
|
-
|
35659
|
-
|
35660
|
-
}
|
35661
|
-
}
|
35662
|
-
}, [quill, overrideValue]);
|
35663
|
-
React.useEffect(() => {
|
35664
|
-
if (quill && (disabled || readOnly)) {
|
35665
|
-
quill.enable(false);
|
35666
|
-
} else if (quill) {
|
35667
|
-
quill.enable(true);
|
35668
|
-
}
|
35669
|
-
}, [readOnly, quill]);
|
35627
|
+
|
35628
|
+
// useEffect(() => {
|
35629
|
+
// if (!quill) return
|
35630
|
+
|
35631
|
+
// quill.clipboard.addMatcher(Node.ELEMENT_NODE, (node, delta) => {
|
35632
|
+
// if (!pasteAsText) return delta
|
35633
|
+
// let ops: Op[] = []
|
35634
|
+
// delta.ops.forEach((op) => {
|
35635
|
+
// if (op.insert && typeof op.insert === 'string') {
|
35636
|
+
// ops.push({
|
35637
|
+
// insert: op.insert,
|
35638
|
+
// })
|
35639
|
+
// }
|
35640
|
+
// })
|
35641
|
+
// delta.ops = ops
|
35642
|
+
// return delta
|
35643
|
+
// })
|
35644
|
+
// }, [quill, pasteAsText])
|
35645
|
+
|
35646
|
+
// useEffect(() => {
|
35647
|
+
// if (quill && overrideValue !== undefined) {
|
35648
|
+
// const currentContent = quill.root.innerHTML
|
35649
|
+
// if (currentContent !== overrideValue) {
|
35650
|
+
// const delta = quill.clipboard.convert({ html: overrideValue })
|
35651
|
+
// quill.setContents(delta)
|
35652
|
+
// }
|
35653
|
+
// }
|
35654
|
+
// }, [quill, overrideValue])
|
35655
|
+
|
35656
|
+
// useEffect(() => {
|
35657
|
+
// if (quill && (disabled || readOnly)) {
|
35658
|
+
// quill.enable(false)
|
35659
|
+
// } else if (quill) {
|
35660
|
+
// quill.enable(true)
|
35661
|
+
// }
|
35662
|
+
// }, [readOnly, quill])
|
35663
|
+
|
35670
35664
|
return jsxRuntime.jsxs("div", {
|
35671
35665
|
css: theme => [styles.default(theme, maxHeight)],
|
35672
35666
|
children: [label && jsxRuntime.jsx(Label, {
|
@@ -207,8 +207,12 @@ const QuillEditor = /*#__PURE__*/forwardRef(({
|
|
207
207
|
}
|
208
208
|
quillInstance.on(Quill.events.TEXT_CHANGE, (...args) => handleChange(...args, quillInstance));
|
209
209
|
quillInstance.on(Quill.events.SELECTION_CHANGE, range => {
|
210
|
-
|
211
|
-
|
210
|
+
const html = quillInstance.root.innerHTML;
|
211
|
+
if (!range) {
|
212
|
+
handelFocus?.(quillInstance);
|
213
|
+
} else {
|
214
|
+
onBlur?.(html);
|
215
|
+
}
|
212
216
|
});
|
213
217
|
isMounted.current = true;
|
214
218
|
setQuill(quillInstance);
|
@@ -217,53 +221,43 @@ const QuillEditor = /*#__PURE__*/forwardRef(({
|
|
217
221
|
container.innerHTML = '';
|
218
222
|
};
|
219
223
|
}, [ref]);
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
}
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
useEffect(() => {
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
}
|
258
|
-
}
|
259
|
-
}, [quill, overrideValue]);
|
260
|
-
useEffect(() => {
|
261
|
-
if (quill && (disabled || readOnly)) {
|
262
|
-
quill.enable(false);
|
263
|
-
} else if (quill) {
|
264
|
-
quill.enable(true);
|
265
|
-
}
|
266
|
-
}, [readOnly, quill]);
|
224
|
+
|
225
|
+
// useEffect(() => {
|
226
|
+
// if (!quill) return
|
227
|
+
|
228
|
+
// quill.clipboard.addMatcher(Node.ELEMENT_NODE, (node, delta) => {
|
229
|
+
// if (!pasteAsText) return delta
|
230
|
+
// let ops: Op[] = []
|
231
|
+
// delta.ops.forEach((op) => {
|
232
|
+
// if (op.insert && typeof op.insert === 'string') {
|
233
|
+
// ops.push({
|
234
|
+
// insert: op.insert,
|
235
|
+
// })
|
236
|
+
// }
|
237
|
+
// })
|
238
|
+
// delta.ops = ops
|
239
|
+
// return delta
|
240
|
+
// })
|
241
|
+
// }, [quill, pasteAsText])
|
242
|
+
|
243
|
+
// useEffect(() => {
|
244
|
+
// if (quill && overrideValue !== undefined) {
|
245
|
+
// const currentContent = quill.root.innerHTML
|
246
|
+
// if (currentContent !== overrideValue) {
|
247
|
+
// const delta = quill.clipboard.convert({ html: overrideValue })
|
248
|
+
// quill.setContents(delta)
|
249
|
+
// }
|
250
|
+
// }
|
251
|
+
// }, [quill, overrideValue])
|
252
|
+
|
253
|
+
// useEffect(() => {
|
254
|
+
// if (quill && (disabled || readOnly)) {
|
255
|
+
// quill.enable(false)
|
256
|
+
// } else if (quill) {
|
257
|
+
// quill.enable(true)
|
258
|
+
// }
|
259
|
+
// }, [readOnly, quill])
|
260
|
+
|
267
261
|
return _jsxs("div", {
|
268
262
|
css: theme => [styles.default(theme, maxHeight)],
|
269
263
|
children: [label && _jsx(Label, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/QuillEditor/index.tsx"],"names":[],"mappings":"AAUA,OAAO,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/QuillEditor/index.tsx"],"names":[],"mappings":"AAUA,OAAO,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAgE3C,QAAA,MAAM,WAAW,6GAiRhB,CAAA;AAED,eAAe,WAAW,CAAA"}
|
@@ -207,8 +207,12 @@ const QuillEditor = /*#__PURE__*/forwardRef(({
|
|
207
207
|
}
|
208
208
|
quillInstance.on(Quill.events.TEXT_CHANGE, (...args) => handleChange(...args, quillInstance));
|
209
209
|
quillInstance.on(Quill.events.SELECTION_CHANGE, range => {
|
210
|
-
|
211
|
-
|
210
|
+
const html = quillInstance.root.innerHTML;
|
211
|
+
if (!range) {
|
212
|
+
handelFocus?.(quillInstance);
|
213
|
+
} else {
|
214
|
+
onBlur?.(html);
|
215
|
+
}
|
212
216
|
});
|
213
217
|
isMounted.current = true;
|
214
218
|
setQuill(quillInstance);
|
@@ -217,53 +221,43 @@ const QuillEditor = /*#__PURE__*/forwardRef(({
|
|
217
221
|
container.innerHTML = '';
|
218
222
|
};
|
219
223
|
}, [ref]);
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
}
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
useEffect(() => {
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
}
|
258
|
-
}
|
259
|
-
}, [quill, overrideValue]);
|
260
|
-
useEffect(() => {
|
261
|
-
if (quill && (disabled || readOnly)) {
|
262
|
-
quill.enable(false);
|
263
|
-
} else if (quill) {
|
264
|
-
quill.enable(true);
|
265
|
-
}
|
266
|
-
}, [readOnly, quill]);
|
224
|
+
|
225
|
+
// useEffect(() => {
|
226
|
+
// if (!quill) return
|
227
|
+
|
228
|
+
// quill.clipboard.addMatcher(Node.ELEMENT_NODE, (node, delta) => {
|
229
|
+
// if (!pasteAsText) return delta
|
230
|
+
// let ops: Op[] = []
|
231
|
+
// delta.ops.forEach((op) => {
|
232
|
+
// if (op.insert && typeof op.insert === 'string') {
|
233
|
+
// ops.push({
|
234
|
+
// insert: op.insert,
|
235
|
+
// })
|
236
|
+
// }
|
237
|
+
// })
|
238
|
+
// delta.ops = ops
|
239
|
+
// return delta
|
240
|
+
// })
|
241
|
+
// }, [quill, pasteAsText])
|
242
|
+
|
243
|
+
// useEffect(() => {
|
244
|
+
// if (quill && overrideValue !== undefined) {
|
245
|
+
// const currentContent = quill.root.innerHTML
|
246
|
+
// if (currentContent !== overrideValue) {
|
247
|
+
// const delta = quill.clipboard.convert({ html: overrideValue })
|
248
|
+
// quill.setContents(delta)
|
249
|
+
// }
|
250
|
+
// }
|
251
|
+
// }, [quill, overrideValue])
|
252
|
+
|
253
|
+
// useEffect(() => {
|
254
|
+
// if (quill && (disabled || readOnly)) {
|
255
|
+
// quill.enable(false)
|
256
|
+
// } else if (quill) {
|
257
|
+
// quill.enable(true)
|
258
|
+
// }
|
259
|
+
// }, [readOnly, quill])
|
260
|
+
|
267
261
|
return _jsxs("div", {
|
268
262
|
css: theme => [styles.default(theme, maxHeight)],
|
269
263
|
children: [label && _jsx(Label, {
|