Add Neon and Meridian glass themes, bundled fonts, configurable recovery backup location, autosave and UI polish
This commit is contained in:
parent
aaa491424d
commit
b74cfe98ab
59 changed files with 1848 additions and 185 deletions
|
|
@ -214,6 +214,27 @@ setEditorDoc(editor5, normalized.doc);
|
|||
ok(editor5.getText().includes("alpha") && editor5.getText().includes("beta"),
|
||||
"legacy camelCase hardBreak chapter loads (not empty)");
|
||||
|
||||
// --- text alignment via toolbar command ---
|
||||
const alignEd = makeEditor();
|
||||
setEditorDoc(alignEd, { type: "doc", content: [{ type: "paragraph", content: [{ type: "text", text: "align me" }] }] });
|
||||
alignEd.commands.focus("end");
|
||||
runCommand(alignEd, "align-center");
|
||||
ok(
|
||||
(alignEd.getJSON().content[0].attrs?.textAlign || "") === "center",
|
||||
"align-center sets the paragraph textAlign"
|
||||
);
|
||||
|
||||
// --- standalone Highlight button (no color) must apply a highlight, not be a no-op ---
|
||||
const hlEd = makeEditor();
|
||||
setEditorDoc(hlEd, { type: "doc", content: [{ type: "paragraph", content: [{ type: "text", text: "mark me" }] }] });
|
||||
hlEd.commands.selectAll();
|
||||
runCommand(hlEd, "highlight");
|
||||
const hlMarks = hlEd.getJSON().content[0].content[0].marks || [];
|
||||
ok(
|
||||
hlMarks.some((m) => m.type === "highlight"),
|
||||
"standalone Highlight button applies a default highlight to the selection"
|
||||
);
|
||||
|
||||
fs.rmSync(out, { force: true });
|
||||
fs.rmSync(book, { recursive: true, force: true });
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue