better-react-email-editor 0.1.7 → 0.1.8
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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -6
- package/dist/index.js.map +1 -1
- package/dist/types/core/spellcheck.d.ts +9 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -400,15 +400,23 @@ var wt = /* @__PURE__ */ new Set(["columnsColumn", "codeBlock"]), Tt = te.create
|
|
|
400
400
|
}), Et = te.create({
|
|
401
401
|
name: "focusedSpellcheck",
|
|
402
402
|
addProseMirrorPlugins() {
|
|
403
|
-
let
|
|
403
|
+
let e = new k("focusedSpellcheck"), t = typeof navigator < "u" && /firefox/i.test(navigator.userAgent), n = !1;
|
|
404
404
|
return [new O({
|
|
405
|
-
key:
|
|
405
|
+
key: e,
|
|
406
|
+
state: {
|
|
407
|
+
init: () => !1,
|
|
408
|
+
apply: (e, t) => e.getMeta("focus") ? t : n
|
|
409
|
+
},
|
|
406
410
|
props: {
|
|
407
411
|
attributes: { spellcheck: "false" },
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
+
handleDOMEvents: {
|
|
413
|
+
focus: () => (n = !0, !1),
|
|
414
|
+
blur: (e) => (n = !1, e.dispatch(e.state.tr.setMeta("addToHistory", !1)), !1)
|
|
415
|
+
},
|
|
416
|
+
decorations: (n) => {
|
|
417
|
+
if (t || !e.getState(n)) return ae.empty;
|
|
418
|
+
let { from: r, to: i, $from: a } = n.selection, o = [];
|
|
419
|
+
return n.doc.nodesBetween(r, i, (e, t) => !e.isTextblock || (o.push(ie.node(t, t + e.nodeSize, { spellcheck: "true" })), !1)), !o.length && a.parent.isTextblock && a.depth > 0 && o.push(ie.node(a.before(), a.after(), { spellcheck: "true" })), ae.create(n.doc, o);
|
|
412
420
|
}
|
|
413
421
|
}
|
|
414
422
|
})];
|