@templatical/editor 0.0.1
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/AiChatSidebar-0vx9TP5B.js +305 -0
- package/dist/AiFeatureMenu-CI-v74ND.js +69 -0
- package/dist/CloudEditor-Wdfv_9xn.js +1132 -0
- package/dist/CollaboratorBar-B3uV4Wtw.js +89 -0
- package/dist/CommentsSidebar-PVUlloyB.js +655 -0
- package/dist/DesignReferenceSidebar-DAlAWrxU.js +351 -0
- package/dist/ModuleBrowserModal-1JEcChd8.js +323 -0
- package/dist/ModulePreviewCanvas-Cdp484Ae.js +169 -0
- package/dist/SaveModuleDialog-eNyr3XKn.js +168 -0
- package/dist/SnapshotHistory-D-ZiIj1v.js +169 -0
- package/dist/TemplateScoringPanel-DSZPo15C.js +385 -0
- package/dist/TestEmailModal-Cwre5elw.js +128 -0
- package/dist/TextEditor-BuUOIByX.js +780 -0
- package/dist/de-BWIAblxs.js +685 -0
- package/dist/en-cYyUzNV1.js +685 -0
- package/dist/index-0tWUczNu.js +47 -0
- package/dist/index-4okvXjqk.js +41 -0
- package/dist/index-BSc6h5zo.js +967 -0
- package/dist/index-CrvwWlhN.js +41 -0
- package/dist/index-D-iD-7lO.js +10961 -0
- package/dist/index-D-ygXbc8.js +2452 -0
- package/dist/index-DbrWKz-e.js +1415 -0
- package/dist/index-DeUeHy6g.js +422 -0
- package/dist/index-Ude6e9RU.js +41 -0
- package/dist/index-ZQzHBwkr.js +12767 -0
- package/dist/liquid.browser-CeNxS2GL.js +3493 -0
- package/dist/loader-circle-tM9j2mRh.js +13 -0
- package/dist/shield-check-Ngi9jAQc.js +20 -0
- package/dist/templatical-editor.css +1 -0
- package/dist/templatical-editor.js +9 -0
- package/dist/templatical-editor.umd.cjs +600 -0
- package/package.json +64 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { E as n } from "./index-ZQzHBwkr.js";
|
|
2
|
+
const r = n.create({
|
|
3
|
+
name: "textAlign",
|
|
4
|
+
addOptions() {
|
|
5
|
+
return {
|
|
6
|
+
types: [],
|
|
7
|
+
alignments: ["left", "center", "right", "justify"],
|
|
8
|
+
defaultAlignment: null
|
|
9
|
+
};
|
|
10
|
+
},
|
|
11
|
+
addGlobalAttributes() {
|
|
12
|
+
return [
|
|
13
|
+
{
|
|
14
|
+
types: this.options.types,
|
|
15
|
+
attributes: {
|
|
16
|
+
textAlign: {
|
|
17
|
+
default: this.options.defaultAlignment,
|
|
18
|
+
parseHTML: (t) => {
|
|
19
|
+
const e = t.style.textAlign;
|
|
20
|
+
return this.options.alignments.includes(e) ? e : this.options.defaultAlignment;
|
|
21
|
+
},
|
|
22
|
+
renderHTML: (t) => t.textAlign ? { style: `text-align: ${t.textAlign}` } : {}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
},
|
|
28
|
+
addCommands() {
|
|
29
|
+
return {
|
|
30
|
+
setTextAlign: (t) => ({ commands: e }) => this.options.alignments.includes(t) ? this.options.types.map((i) => e.updateAttributes(i, { textAlign: t })).every((i) => i) : !1,
|
|
31
|
+
unsetTextAlign: () => ({ commands: t }) => this.options.types.map((e) => t.resetAttributes(e, "textAlign")).every((e) => e),
|
|
32
|
+
toggleTextAlign: (t) => ({ editor: e, commands: i }) => this.options.alignments.includes(t) ? e.isActive({ textAlign: t }) ? i.unsetTextAlign() : i.setTextAlign(t) : !1
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
addKeyboardShortcuts() {
|
|
36
|
+
return {
|
|
37
|
+
"Mod-Shift-l": () => this.editor.commands.setTextAlign("left"),
|
|
38
|
+
"Mod-Shift-e": () => this.editor.commands.setTextAlign("center"),
|
|
39
|
+
"Mod-Shift-r": () => this.editor.commands.setTextAlign("right"),
|
|
40
|
+
"Mod-Shift-j": () => this.editor.commands.setTextAlign("justify")
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
export {
|
|
45
|
+
r as TextAlign,
|
|
46
|
+
r as default
|
|
47
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { M as r, m as e } from "./index-ZQzHBwkr.js";
|
|
2
|
+
const u = r.create({
|
|
3
|
+
name: "subscript",
|
|
4
|
+
addOptions() {
|
|
5
|
+
return {
|
|
6
|
+
HTMLAttributes: {}
|
|
7
|
+
};
|
|
8
|
+
},
|
|
9
|
+
parseHTML() {
|
|
10
|
+
return [
|
|
11
|
+
{
|
|
12
|
+
tag: "sub"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
style: "vertical-align",
|
|
16
|
+
getAttrs(t) {
|
|
17
|
+
return t !== "sub" ? !1 : null;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
];
|
|
21
|
+
},
|
|
22
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
23
|
+
return ["sub", e(this.options.HTMLAttributes, t), 0];
|
|
24
|
+
},
|
|
25
|
+
addCommands() {
|
|
26
|
+
return {
|
|
27
|
+
setSubscript: () => ({ commands: t }) => t.setMark(this.name),
|
|
28
|
+
toggleSubscript: () => ({ commands: t }) => t.toggleMark(this.name),
|
|
29
|
+
unsetSubscript: () => ({ commands: t }) => t.unsetMark(this.name)
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
addKeyboardShortcuts() {
|
|
33
|
+
return {
|
|
34
|
+
"Mod-,": () => this.editor.commands.toggleSubscript()
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
export {
|
|
39
|
+
u as Subscript,
|
|
40
|
+
u as default
|
|
41
|
+
};
|