mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-22 06:54:08 +01:00
This commit is contained in:
parent
73e0a968e2
commit
4fdcb11309
9 changed files with 126 additions and 96 deletions
|
|
@ -78,28 +78,28 @@ export class Options {
|
|||
mode: "both",
|
||||
},
|
||||
toolbar: isMobile() ? [
|
||||
"blockRef",
|
||||
"link",
|
||||
"block-ref",
|
||||
"a",
|
||||
"|",
|
||||
"bold",
|
||||
"italic",
|
||||
"underline",
|
||||
"strike",
|
||||
"strong",
|
||||
"em",
|
||||
"u",
|
||||
"s",
|
||||
"mark",
|
||||
"|",
|
||||
"tag",
|
||||
"inline-code",
|
||||
"code",
|
||||
"inline-math",
|
||||
"|",
|
||||
"font",
|
||||
"text",
|
||||
] : [
|
||||
"blockRef",
|
||||
"link",
|
||||
"block-ref",
|
||||
"a",
|
||||
"|",
|
||||
"bold",
|
||||
"italic",
|
||||
"underline",
|
||||
"strike",
|
||||
"strong",
|
||||
"em",
|
||||
"u",
|
||||
"s",
|
||||
"mark",
|
||||
"|",
|
||||
"sup",
|
||||
|
|
@ -107,10 +107,10 @@ export class Options {
|
|||
"kbd",
|
||||
"|",
|
||||
"tag",
|
||||
"inline-code",
|
||||
"code",
|
||||
"inline-math",
|
||||
"|",
|
||||
"font",
|
||||
"text",
|
||||
],
|
||||
typewriterMode: false,
|
||||
upload: {
|
||||
|
|
@ -145,79 +145,92 @@ export class Options {
|
|||
|
||||
private mergeToolbar(toolbar: Array<string | IMenuItem>) {
|
||||
const toolbarItem: IMenuItem [] = [{
|
||||
name: "blockRef",
|
||||
name: "block-ref",
|
||||
hotkey: window.siyuan.config.keymap.editor.insert.blockRef.custom,
|
||||
lang: "blockRef",
|
||||
icon: "iconGraph",
|
||||
tipPosition: "ne",
|
||||
}, {
|
||||
name: "link",
|
||||
name: "a",
|
||||
hotkey: window.siyuan.config.keymap.editor.insert.link.custom,
|
||||
lang: "link",
|
||||
icon: "iconLink",
|
||||
tipPosition: "n",
|
||||
}, {
|
||||
name: "bold",
|
||||
name: "strong",
|
||||
lang: "bold",
|
||||
hotkey: window.siyuan.config.keymap.editor.insert.bold.custom,
|
||||
icon: "iconBold",
|
||||
tipPosition: "n",
|
||||
}, {
|
||||
name: "italic",
|
||||
name: "em",
|
||||
lang: "italic",
|
||||
hotkey: window.siyuan.config.keymap.editor.insert.italic.custom,
|
||||
icon: "iconItalic",
|
||||
tipPosition: "n",
|
||||
}, {
|
||||
name: "underline",
|
||||
name: "u",
|
||||
lang: "underline",
|
||||
hotkey: window.siyuan.config.keymap.editor.insert.underline.custom,
|
||||
icon: "iconUnderline",
|
||||
tipPosition: "n",
|
||||
}, {
|
||||
name: "strike",
|
||||
name: "s",
|
||||
lang: "strike",
|
||||
hotkey: window.siyuan.config.keymap.editor.insert.strike.custom,
|
||||
icon: "iconStrike",
|
||||
tipPosition: "n",
|
||||
}, {
|
||||
name: "mark",
|
||||
lang: "mark",
|
||||
hotkey: window.siyuan.config.keymap.editor.insert.mark.custom,
|
||||
icon: "iconMark",
|
||||
tipPosition: "n",
|
||||
}, {
|
||||
name: "sup",
|
||||
lang: "sup",
|
||||
hotkey: window.siyuan.config.keymap.editor.insert.sup.custom,
|
||||
icon: "iconSup",
|
||||
tipPosition: "n",
|
||||
}, {
|
||||
name: "sub",
|
||||
lang: "sub",
|
||||
hotkey: window.siyuan.config.keymap.editor.insert.sub.custom,
|
||||
icon: "iconSub",
|
||||
tipPosition: "n",
|
||||
}, {
|
||||
name: "kbd",
|
||||
lang: "kbd",
|
||||
hotkey: window.siyuan.config.keymap.editor.insert.kbd.custom,
|
||||
icon: "iconKeymap",
|
||||
tipPosition: "n",
|
||||
}, {
|
||||
name: "tag",
|
||||
lang: "tag",
|
||||
hotkey: window.siyuan.config.keymap.editor.insert.tag.custom,
|
||||
icon: "iconTags",
|
||||
tipPosition: "n",
|
||||
}, {
|
||||
name: "inline-code",
|
||||
name: "code",
|
||||
lang: "inline-code",
|
||||
hotkey: window.siyuan.config.keymap.editor.insert["inline-code"].custom,
|
||||
icon: "iconInlineCode",
|
||||
tipPosition: "n",
|
||||
}, {
|
||||
name: "inline-math",
|
||||
lang: "inline-math",
|
||||
hotkey: window.siyuan.config.keymap.editor.insert["inline-math"].custom,
|
||||
icon: "iconMath",
|
||||
tipPosition: "n",
|
||||
}, {
|
||||
name: "font",
|
||||
name: "text",
|
||||
lang: "font",
|
||||
hotkey: window.siyuan.config.keymap.editor.insert.font.custom,
|
||||
icon: "iconFont",
|
||||
tipPosition: "n",
|
||||
}, {
|
||||
name: "|",
|
||||
}
|
||||
];
|
||||
}];
|
||||
const toolbarResult: IMenuItem[] = [];
|
||||
toolbar.forEach((menuItem: IMenuItem) => {
|
||||
let currentMenuItem = menuItem;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue