Vanessa 2022-10-28 20:13:37 +08:00
parent 911490c350
commit 3d292a9b7b
8 changed files with 23 additions and 1 deletions

View file

@ -5,6 +5,7 @@ import {confirmDialog} from "../dialog/confirmDialog";
import {setPadding} from "../protyle/ui/initUI";
import {reloadProtyle} from "../protyle/util/reload";
import {disabledProtyle, enableProtyle} from "../protyle/util/onGet";
import {updateHotkeyTip} from "../protyle/util/compatibility";
export const editor = {
element: undefined as Element,
@ -100,6 +101,14 @@ export const editor = {
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="embedBlockBreadcrumb" type="checkbox"${window.siyuan.config.editor.embedBlockBreadcrumb ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.floatWindowMode}
<div class="b3-label__text">${window.siyuan.languages.floatWindowModeTip.replace("${hotkey}", updateHotkeyTip("⌘"))}</div>
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="floatWindowMode" type="checkbox"${window.siyuan.config.editor.floatWindowMode === 0 ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.outlineOutdent}
@ -252,6 +261,7 @@ export const editor = {
codeSyntaxHighlightLineNum: (editor.element.querySelector("#codeSyntaxHighlightLineNum") as HTMLInputElement).checked,
embedBlockBreadcrumb: (editor.element.querySelector("#embedBlockBreadcrumb") as HTMLInputElement).checked,
listLogicalOutdent: (editor.element.querySelector("#listLogicalOutdent") as HTMLInputElement).checked,
floatWindowMode: (editor.element.querySelector("#floatWindowMode") as HTMLInputElement).checked ? 0 : 1,
plantUMLServePath: (editor.element.querySelector("#plantUMLServePath") as HTMLInputElement).value,
katexMacros: (editor.element.querySelector("#katexMacros") as HTMLTextAreaElement).value,
codeLineWrap: (editor.element.querySelector("#codeLineWrap") as HTMLInputElement).checked,

View file

@ -15,7 +15,8 @@ export const initConfigSearch = (element: HTMLElement) => {
"editor", "md2", "md3", "md12", "md16", "md27", "md28", "md29", "md30", "md31", "md32", "md33", "md34",
"md39", "md40", "fontSizeTip", "fontSize", "font", "font1", "generateHistory", "generateHistoryInterval",
"historyRetentionDays", "historyRetentionDaysTip", "clearHistory", "katexMacros", "katexMacrosTip",
"editReadonly", "editReadonlyTip", "embedBlockBreadcrumb", "embedBlockBreadcrumbTip", "outdentTip", "outdent"
"editReadonly", "editReadonlyTip", "embedBlockBreadcrumb", "embedBlockBreadcrumbTip", "outdentTip",
"outdent", "floatWindowMode", "floatWindowModeTip"
]),
// 文档树

View file

@ -246,6 +246,7 @@ declare interface IEditor {
listLogicalOutdent: boolean;
katexMacros: string;
fullWidth: boolean;
floatWindowMode: number;
fontSize: number;
generateHistoryInterval: number;
historyRetentionDays: number;