designertool 0.46.0 → 0.48.0
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/designertool.js +14 -11
- package/package.json +1 -1
package/dist/designertool.js
CHANGED
|
@@ -7906,14 +7906,16 @@ const defaultConfig = {
|
|
|
7906
7906
|
addFont(ye) {
|
|
7907
7907
|
const ae = (Ne) => {
|
|
7908
7908
|
const rt = document.createElement("link");
|
|
7909
|
-
rt.href = Ne.link, rt.rel = "stylesheet", document.head.appendChild(rt)
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
|
|
7909
|
+
if (rt.href = Ne.link, rt.rel = "stylesheet", document.head.appendChild(rt), !/\.css(\?|$)/i.test(Ne.link) && !Ne.link.includes("fonts.googleapis.com")) {
|
|
7910
|
+
const ft = document.createElement("style");
|
|
7911
|
+
ft.textContent = `
|
|
7912
|
+
@font-face {
|
|
7913
|
+
font-family: "${Ne.name}";
|
|
7914
|
+
src: url(${Ne.link});
|
|
7915
|
+
}
|
|
7916
|
+
`, document.head.appendChild(ft);
|
|
7917
|
+
}
|
|
7918
|
+
this.config.fonts.find((ft) => ft.name === Ne.name) || this.config.fonts.push(Ne);
|
|
7917
7919
|
};
|
|
7918
7920
|
Array.isArray(ye) ? ye.forEach(ae) : ae(ye), this.config.fonts.sort(
|
|
7919
7921
|
(Ne, rt) => Ne.name.toLowerCase() < rt.name.toLowerCase() ? -1 : Ne.name.toLowerCase() > rt.name.toLowerCase() ? 1 : 0
|
|
@@ -27979,7 +27981,7 @@ const _hoisted_1$M = ["is-dragging"], _sfc_main$N = /* @__PURE__ */ defineCompon
|
|
|
27979
27981
|
}), or = computed({
|
|
27980
27982
|
get() {
|
|
27981
27983
|
if (!Pt.value) return Qt.value[0];
|
|
27982
|
-
const { state: _r } = Pt.value, { $from: $r } = _r.selection, Br = $r.marks().find((jr) => jr.type.name === "textStyle"), qr = (Br == null ? void 0 : Br.attrs.fontFamily) || "Arial";
|
|
27984
|
+
const { state: _r } = Pt.value, { $from: $r } = _r.selection, Br = $r.marks().find((jr) => jr.type.name === "textStyle"), qr = (Br == null ? void 0 : Br.attrs.fontFamily) || "Arial".replace(/['"]/g, "");
|
|
27983
27985
|
return Qt.value.find((jr) => jr.name === qr) || Qt.value[0];
|
|
27984
27986
|
},
|
|
27985
27987
|
set(_r) {
|
|
@@ -53792,7 +53794,8 @@ const FontSize = Extension.create({
|
|
|
53792
53794
|
underline: bt.value.isActive("underline"),
|
|
53793
53795
|
strike: bt.value.isActive("strike"),
|
|
53794
53796
|
color: (or == null ? void 0 : or.attrs.color) || "#000000",
|
|
53795
|
-
|
|
53797
|
+
// Added this fix since the 2 worded font family names were not loading correctly in the font selector when the text was higlighted
|
|
53798
|
+
fontFamily: ((or == null ? void 0 : or.attrs.fontFamily) || "Arial").replace(/['"]/g, ""),
|
|
53796
53799
|
fontSize: (or == null ? void 0 : or.attrs.fontSize) || null,
|
|
53797
53800
|
textAlign: bt.value.getAttributes("paragraph").textAlign || "left"
|
|
53798
53801
|
};
|
|
@@ -53916,7 +53919,7 @@ const FontSize = Extension.create({
|
|
|
53916
53919
|
}, null, 8, ["editor", "style"])) : createCommentVNode("", !0)
|
|
53917
53920
|
], 8, _hoisted_1$e));
|
|
53918
53921
|
}
|
|
53919
|
-
}), _style_0$a = ".tiptap-editor[data-v-
|
|
53922
|
+
}), _style_0$a = ".tiptap-editor[data-v-1e83c726]{width:100%;height:100%;position:relative;z-index:10}[data-v-1e83c726] .ProseMirror{outline:none;width:100%;height:100%;padding:0;margin:0;user-select:text;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text}[data-v-1e83c726] .ProseMirror p{margin:0;padding:0}[data-v-1e83c726] .ProseMirror *{user-select:text;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text}.tiptap-editor[data-editable=true][data-v-1e83c726]{pointer-events:all;position:relative;z-index:1000}.tiptap-editor[data-editable=true][data-v-1e83c726] .ProseMirror{cursor:text!important;position:relative;z-index:1001}.tiptap-editor[data-editable=false][data-v-1e83c726]{pointer-events:all;cursor:move!important}.tiptap-editor[data-editable=false][data-v-1e83c726] .ProseMirror{cursor:move!important;user-select:none!important;-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important}[data-v-1e83c726] .selection{background:#3b82f633;border-radius:2px}.tiptap-editor[data-v-1e83c726]{text-wrap:nowrap}", TipTapEditor = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["styles", [_style_0$a]], ["__scopeId", "data-v-1e83c726"]]), _hoisted_1$d = ["innerHTML"], _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
53920
53923
|
__name: "Text",
|
|
53921
53924
|
props: {
|
|
53922
53925
|
id: { type: Number }
|