mirror of
https://github.com/zadam/trilium.git
synced 2025-10-09 15:08:14 +08:00
style/text editor/text alignment dropdown: use a horizontal toolbar instead of a vertical one
This commit is contained in:
parent
3d285e105e
commit
fcb77360e1
1 changed files with 11 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
import utils from "../../../services/utils.js";
|
import utils from "../../../services/utils.js";
|
||||||
import options from "../../../services/options.js";
|
import options from "../../../services/options.js";
|
||||||
|
import IconAlignCenter from "@ckeditor/ckeditor5-icons/theme/icons/align-center.svg?raw";
|
||||||
|
|
||||||
const TEXT_FORMATTING_GROUP = {
|
const TEXT_FORMATTING_GROUP = {
|
||||||
label: "Text formatting",
|
label: "Text formatting",
|
||||||
|
@ -77,7 +78,7 @@ export function buildClassicToolbar(multilineToolbar: boolean) {
|
||||||
items: ["imageUpload", "|", "link", "bookmark", "internallink", "includeNote", "|", "specialCharacters", "emoji", "math", "mermaid", "horizontalLine", "pageBreak", "dateTime"]
|
items: ["imageUpload", "|", "link", "bookmark", "internallink", "includeNote", "|", "specialCharacters", "emoji", "math", "mermaid", "horizontalLine", "pageBreak", "dateTime"]
|
||||||
},
|
},
|
||||||
"|",
|
"|",
|
||||||
"alignment",
|
buildAlignmentToolbar(),
|
||||||
"outdent",
|
"outdent",
|
||||||
"indent",
|
"indent",
|
||||||
"|",
|
"|",
|
||||||
|
@ -134,7 +135,7 @@ export function buildFloatingToolbar() {
|
||||||
items: ["link", "bookmark", "internallink", "includeNote", "|", "math", "mermaid", "horizontalLine", "pageBreak", "dateTime"]
|
items: ["link", "bookmark", "internallink", "includeNote", "|", "math", "mermaid", "horizontalLine", "pageBreak", "dateTime"]
|
||||||
},
|
},
|
||||||
"|",
|
"|",
|
||||||
"alignment",
|
buildAlignmentToolbar(),
|
||||||
"outdent",
|
"outdent",
|
||||||
"indent",
|
"indent",
|
||||||
"|",
|
"|",
|
||||||
|
@ -147,3 +148,11 @@ export function buildFloatingToolbar() {
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function buildAlignmentToolbar() {
|
||||||
|
return {
|
||||||
|
label: "Alignment",
|
||||||
|
icon: IconAlignCenter,
|
||||||
|
items: ["alignment:left", "alignment:center", "alignment:right", "|", "alignment:justify"]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue