tiptapify 0.0.21 → 0.0.23
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/tiptapify.mjs
CHANGED
|
@@ -77444,18 +77444,19 @@ function mW2(e, t, r) {
|
|
|
77444
77444
|
];
|
|
77445
77445
|
if (t && a.push(RU2.configure({ suggestion: jU2 })), r.length) {
|
|
77446
77446
|
for (const n of r)
|
|
77447
|
-
|
|
77448
|
-
|
|
77449
|
-
|
|
77450
|
-
a.push(o);
|
|
77447
|
+
if (!(typeof n.extensions > "u"))
|
|
77448
|
+
for (const i of n.extensions)
|
|
77449
|
+
a.push(i);
|
|
77451
77450
|
}
|
|
77452
77451
|
return a;
|
|
77453
77452
|
}
|
|
77454
|
-
function fW2(e, t, r = !0, a) {
|
|
77455
|
-
|
|
77453
|
+
function fW2(e, t, r = !0, a, n = () => {
|
|
77454
|
+
}) {
|
|
77455
|
+
const i = mW2(t, r, a);
|
|
77456
77456
|
return Mx2({
|
|
77457
77457
|
content: e,
|
|
77458
|
-
extensions:
|
|
77458
|
+
extensions: i,
|
|
77459
|
+
onUpdate: ({ editor: C }) => n()
|
|
77459
77460
|
});
|
|
77460
77461
|
}
|
|
77461
77462
|
const AW2 = {
|
|
@@ -77567,29 +77568,35 @@ const AW2 = {
|
|
|
77567
77568
|
return [];
|
|
77568
77569
|
} }
|
|
77569
77570
|
},
|
|
77570
|
-
emits: ["update:modelValue", "editor-ready"],
|
|
77571
|
+
emits: ["update:modelValue", "editor-ready", "content-changed"],
|
|
77571
77572
|
setup(e, { emit: t }) {
|
|
77572
|
-
var
|
|
77573
|
-
const { t: r, setLocale: a } = EI2(), n = e, i = B8(), o = t1(i.global.name)
|
|
77573
|
+
var V;
|
|
77574
|
+
const { t: r, setLocale: a } = EI2(), n = e, i = B8(), o = t1(i.global.name);
|
|
77575
|
+
function C() {
|
|
77576
|
+
var l, L;
|
|
77577
|
+
H("content-changed", { html: (l = s.value) == null ? void 0 : l.getHTML(), json: (L = s.value) == null ? void 0 : L.getJSON() });
|
|
77578
|
+
}
|
|
77579
|
+
const s = fW2(
|
|
77574
77580
|
n.content,
|
|
77575
77581
|
k(() => n.placeholder || r("content.placeholder")).value,
|
|
77576
77582
|
n.slashCommands,
|
|
77577
|
-
n.customExtensions
|
|
77578
|
-
|
|
77579
|
-
|
|
77580
|
-
|
|
77581
|
-
|
|
77582
|
-
|
|
77583
|
-
|
|
77583
|
+
n.customExtensions,
|
|
77584
|
+
C
|
|
77585
|
+
), H = t;
|
|
77586
|
+
return o5("tiptapifyEditor", s), o5("tiptapifyI18n", { t: r, setLocale: a }), (V = s.value) == null || V.chain().setFontFamily(n.defaultFontFamily).run(), y1(() => s.value, (l) => {
|
|
77587
|
+
l instanceof hc && H("editor-ready", {
|
|
77588
|
+
editor: l,
|
|
77589
|
+
getHTML: () => l.getHTML(),
|
|
77590
|
+
getJSON: () => l.getJSON()
|
|
77584
77591
|
});
|
|
77585
77592
|
}, { immediate: !0 }), y1(() => n.locale, () => {
|
|
77586
77593
|
a(n.locale);
|
|
77587
77594
|
}, { immediate: !0 }), g5(() => {
|
|
77588
|
-
var
|
|
77589
|
-
(
|
|
77590
|
-
}), (
|
|
77595
|
+
var l;
|
|
77596
|
+
(l = s.value) == null || l.destroy();
|
|
77597
|
+
}), (l, L) => (Y(), j1(p1, null, [
|
|
77591
77598
|
e.toolbar ? (Y(), j1(p1, { key: 0 }, [
|
|
77592
|
-
Z(
|
|
77599
|
+
Z(s) ? (Y(), S1(hE2, {
|
|
77593
77600
|
key: 0,
|
|
77594
77601
|
"variant-btn": e.variantBtn,
|
|
77595
77602
|
"variant-field": e.variantField,
|
|
@@ -77619,7 +77626,7 @@ const AW2 = {
|
|
|
77619
77626
|
theme: o.value
|
|
77620
77627
|
}, null, 8, ["variant", "theme"])) : n0("", !0),
|
|
77621
77628
|
A(Z(cx2), {
|
|
77622
|
-
editor: Z(
|
|
77629
|
+
editor: Z(s),
|
|
77623
77630
|
class: "tiptapify-editor"
|
|
77624
77631
|
}, null, 8, ["editor"])
|
|
77625
77632
|
], 4),
|
|
@@ -77630,7 +77637,7 @@ const AW2 = {
|
|
|
77630
77637
|
], 2)
|
|
77631
77638
|
], 64));
|
|
77632
77639
|
}
|
|
77633
|
-
}), bW2 = /* @__PURE__ */ _5(vW2, [["__scopeId", "data-v-
|
|
77640
|
+
}), bW2 = /* @__PURE__ */ _5(vW2, [["__scopeId", "data-v-870bb767"]]), kW2 = {
|
|
77634
77641
|
install(e, t = {}) {
|
|
77635
77642
|
e.component("Tiptapify", bW2), e.component("TiptapifyDialog", A4);
|
|
77636
77643
|
}
|