@blocknote/core 0.51.0 → 0.51.2
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/blocknote.cjs +1 -1
- package/dist/blocknote.js +2 -2
- package/dist/{extensions-Cuw3zOdC.cjs → extensions-Cutrafjg.cjs} +2 -2
- package/dist/extensions-Cutrafjg.cjs.map +1 -0
- package/dist/{extensions-CQFfm5f5.js → extensions-D2mx2C9y.js} +7 -4
- package/dist/extensions-D2mx2C9y.js.map +1 -0
- package/dist/extensions.cjs +1 -1
- package/dist/extensions.js +1 -1
- package/dist/{src-_83jmA7A.cjs → src-D5R5YzV7.cjs} +3 -3
- package/dist/src-D5R5YzV7.cjs.map +1 -0
- package/dist/{src-DK_8q1j5.js → src-Dvmif2FY.js} +4 -4
- package/dist/src-Dvmif2FY.js.map +1 -0
- package/dist/webpack-stats.json +1 -1
- package/package.json +1 -1
- package/src/api/clipboard/toClipboard/copyExtension.ts +12 -1
- package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +12 -4
- package/types/src/api/exporters/html/util/serializeBlocksExternalHTML.d.ts +1 -0
- package/dist/extensions-CQFfm5f5.js.map +0 -1
- package/dist/extensions-Cuw3zOdC.cjs.map +0 -1
- package/dist/src-DK_8q1j5.js.map +0 -1
- package/dist/src-_83jmA7A.cjs.map +0 -1
|
@@ -21,8 +21,8 @@ function Le(e) {
|
|
|
21
21
|
function Re(t, n, r, i) {
|
|
22
22
|
let a;
|
|
23
23
|
if (!n) throw Error("blockContent is required");
|
|
24
|
-
if (typeof n == "string") a = e([n], t.pmSchema);
|
|
25
|
-
else if (Array.isArray(n)) a = e(n, t.pmSchema);
|
|
24
|
+
if (typeof n == "string") a = e([n], t.pmSchema, i?.blockType);
|
|
25
|
+
else if (Array.isArray(n)) a = e(n, t.pmSchema, i?.blockType);
|
|
26
26
|
else if (n.type === "tableContent") a = ee(n, t.pmSchema);
|
|
27
27
|
else throw new re(n.type);
|
|
28
28
|
let o = (i?.document ?? document).createDocumentFragment();
|
|
@@ -76,7 +76,10 @@ function ze(e, t, n, r, i, a, o, s) {
|
|
|
76
76
|
Le(m.dom.firstChild), o > 0 && m.dom.firstChild.setAttribute("data-nesting-level", o.toString()), h.append(...Array.from(m.dom.childNodes));
|
|
77
77
|
} else h.append(m.dom), o > 0 && m.dom.setAttribute("data-nesting-level", o.toString());
|
|
78
78
|
if (m.contentDOM && n.content) {
|
|
79
|
-
let e = Re(t, n.content, r,
|
|
79
|
+
let e = Re(t, n.content, r, {
|
|
80
|
+
...s,
|
|
81
|
+
blockType: n.type
|
|
82
|
+
});
|
|
80
83
|
m.contentDOM.appendChild(e);
|
|
81
84
|
}
|
|
82
85
|
let g;
|
|
@@ -1752,4 +1755,4 @@ var on = v(({ editor: e }) => {
|
|
|
1752
1755
|
//#endregion
|
|
1753
1756
|
export { j as C, Ke as D, qe as E, O, Ze as S, k as T, ct as _, Zt as a, ot as b, Jt as c, W as d, _t as f, lt as g, ut as h, Q as i, Vt as l, ft as m, rn as n, Yt as o, mt as p, nn as r, J as s, on as t, Bt as u, st as v, A as w, $e as x, at as y };
|
|
1754
1757
|
|
|
1755
|
-
//# sourceMappingURL=extensions-
|
|
1758
|
+
//# sourceMappingURL=extensions-D2mx2C9y.js.map
|