v0.2.96
This commit is contained in:
1 parent
b15a6c54ce
commit
d36a4b2451
22 files changed
+926
-114
No files matched your search
@@ -55,7 +55,7 @@ function insertStandaloneLine(editor, content) {
|
||||
}
|
||||
|
||||
export function insertPageBreak(editor) {
|
||||
insertStandaloneLine(editor, "[PAGEBREAK]");
|
||||
insertStandaloneLine(editor, "[PDF_PAGEBREAK]");
|
||||
}
|
||||
|
||||
export function insertHorizontalRule(editor) {
|
||||
@@ -107,6 +107,10 @@ export function applyFormat(editor, format) {
|
||||
if (format === "footnote") toggleWrap(editor, "", `[^1]\n\n[^1]: ${t("editor.format.footnote", {}, "Footnote text")}`, t("editor.format.textWithFootnote", {}, "Text with footnote"));
|
||||
if (format === "definition") toggleWrap(editor, "", `\n: ${t("editor.format.definition", {}, "Definition")}`, t("editor.format.term", {}, "Term"));
|
||||
if (format === "page-break") insertPageBreak(editor);
|
||||
if (format === "pdf-header") insertStandaloneLine(editor, "[PDF_HEADER]");
|
||||
if (format === "pdf-footer") insertStandaloneLine(editor, "[PDF_FOOTER]");
|
||||
if (format === "pdf-align-top") insertStandaloneLine(editor, "[PDF_ALIGN_TOP]");
|
||||
if (format === "pdf-align-center") insertStandaloneLine(editor, "[PDF_ALIGN_CENTER]");
|
||||
if (format === "horizontal-rule") insertHorizontalRule(editor);
|
||||
editor.focus();
|
||||
editor.dispatchEvent(new Event("input", { bubbles: true }));
|
||||
|
||||
Reference in new issue
Block a user