mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-21 15:56:10 +01:00
🎨 Add configuration item Editor - [[ Only search doc block Fix https://github.com/siyuan-note/siyuan/issues/8077
This commit is contained in:
parent
4393d844ad
commit
4ec4e1d882
12 changed files with 38 additions and 13 deletions
|
|
@ -98,6 +98,14 @@ export const editor = {
|
|||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" id="spellcheck" type="checkbox"${window.siyuan.config.editor.spellcheck ? " checked" : ""}/>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.onlySearchForDoc}
|
||||
<div class="b3-label__text">${window.siyuan.languages.onlySearchForDocTip}</div>
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" id="onlySearchForDoc" type="checkbox"${window.siyuan.config.editor.onlySearchForDoc ? " checked" : ""}/>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.md31}
|
||||
|
|
@ -280,6 +288,7 @@ export const editor = {
|
|||
embedBlockBreadcrumb: (editor.element.querySelector("#embedBlockBreadcrumb") as HTMLInputElement).checked,
|
||||
listLogicalOutdent: (editor.element.querySelector("#listLogicalOutdent") as HTMLInputElement).checked,
|
||||
spellcheck: (editor.element.querySelector("#spellcheck") as HTMLInputElement).checked,
|
||||
onlySearchForDoc: (editor.element.querySelector("#onlySearchForDoc") 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,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export const initConfigSearch = (element: HTMLElement) => {
|
|||
"historyRetentionDays", "historyRetentionDaysTip", "clearHistory", "katexMacros", "katexMacrosTip",
|
||||
"editReadonly", "editReadonlyTip", "embedBlockBreadcrumb", "embedBlockBreadcrumbTip", "outlineOutdentTip",
|
||||
"outdent", "floatWindowMode", "floatWindowModeTip", "justify", "justifyTip", "rtl", "rtlTip", "spellcheck",
|
||||
"spellcheckTip", "backlinkExpand", "backlinkExpandTip"
|
||||
"spellcheckTip", "backlinkExpand", "backlinkExpandTip", "onlySearchForDocTip"
|
||||
]),
|
||||
|
||||
// 文档树
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ const setEditor = (modelMainElement: Element) => {
|
|||
window.siyuan.config.editor.embedBlockBreadcrumb = (modelMainElement.querySelector("#embedBlockBreadcrumb") as HTMLInputElement).checked;
|
||||
window.siyuan.config.editor.listLogicalOutdent = (modelMainElement.querySelector("#listLogicalOutdent") as HTMLInputElement).checked;
|
||||
window.siyuan.config.editor.spellcheck = (modelMainElement.querySelector("#spellcheck") as HTMLInputElement).checked;
|
||||
window.siyuan.config.editor.onlySearchForDoc = (modelMainElement.querySelector("#onlySearchForDoc") as HTMLInputElement).checked;
|
||||
window.siyuan.config.editor.plantUMLServePath = (modelMainElement.querySelector("#plantUMLServePath") as HTMLInputElement).value;
|
||||
window.siyuan.config.editor.katexMacros = (modelMainElement.querySelector("#katexMacros") as HTMLTextAreaElement).value;
|
||||
window.siyuan.config.editor.codeLineWrap = (modelMainElement.querySelector("#codeLineWrap") as HTMLInputElement).checked;
|
||||
|
|
@ -108,6 +109,14 @@ export const initEditor = () => {
|
|||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" id="spellcheck" type="checkbox"${window.siyuan.config.editor.spellcheck ? " checked" : ""}/>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.onlySearchForDoc}
|
||||
<div class="b3-label__text">${window.siyuan.languages.onlySearchForDocTip}</div>
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" id="onlySearchForDoc" type="checkbox"${window.siyuan.config.editor.spellcheck ? " checked" : ""}/>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.md31}
|
||||
|
|
|
|||
3
app/src/types/index.d.ts
vendored
3
app/src/types/index.d.ts
vendored
|
|
@ -200,7 +200,7 @@ interface ISiyuan {
|
|||
mobile?: {
|
||||
editor?: import("../protyle").Protyle
|
||||
popEditor?: import("../protyle").Protyle
|
||||
files?: import("../mobile/util/MobileFiles").MobileFiles
|
||||
files?: import("../mobile/dock/MobileFiles").MobileFiles
|
||||
},
|
||||
user?: {
|
||||
userId: string
|
||||
|
|
@ -332,6 +332,7 @@ declare interface IEditor {
|
|||
readOnly: boolean;
|
||||
listLogicalOutdent: boolean;
|
||||
spellcheck: boolean;
|
||||
onlySearchForDoc: boolean;
|
||||
katexMacros: string;
|
||||
fullWidth: boolean;
|
||||
floatWindowMode: number;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue