mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-18 14:35:27 +01:00
This commit is contained in:
parent
88f9318e0b
commit
15e40d2c2b
6 changed files with 13 additions and 10 deletions
|
|
@ -218,14 +218,19 @@ export const setInlineStyle = (set = true) => {
|
|||
.protyle-wysiwyg .h5 img.emoji, .b3-typography h5 img.emoji {width:${Math.floor(window.siyuan.config.editor.fontSize * 1.13 * 1.25)}px}
|
||||
.protyle-wysiwyg .h6 img.emoji, .b3-typography h6 img.emoji {width:${Math.floor(window.siyuan.config.editor.fontSize * 1.25)}px}`;
|
||||
if (window.siyuan.config.editor.fontFamily) {
|
||||
style += `\n.b3-typography:not(.b3-typography--default), .protyle-wysiwyg, .protyle-title, .protyle-title__input{font-family: "${window.siyuan.config.editor.fontFamily}", "Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans GB", "Microsoft Yahei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols" !important;}`;
|
||||
style += `\n.b3-typography:not(.b3-typography--default), .protyle {font-family: "${window.siyuan.config.editor.fontFamily}", var(--b3-font-family)}`;
|
||||
}
|
||||
// pad 端菜单移除显示,如工作空间
|
||||
if ("ontouchend" in document) {
|
||||
style += "\n.b3-menu .b3-menu__action {opacity: 0.68;}";
|
||||
}
|
||||
if (set) {
|
||||
document.getElementById("editorFontSize").innerHTML = style;
|
||||
const siyuanStyle = document.getElementById("siyuanStyle")
|
||||
if (siyuanStyle) {
|
||||
siyuanStyle.innerHTML = style;
|
||||
} else {
|
||||
document.head.insertAdjacentHTML("beforeend", `<style id="siyuanStyle">${style}</style>`);
|
||||
}
|
||||
}
|
||||
return style;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue