Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Always show heading numbering format setting https://github.com/siyuan-note/siyuan/issues/18720

Daniele294e3069a81
diff --git a/app/src/config/tabs/editorTab.ts b/app/src/config/tabs/editorTab.ts
index a9aff92ad9..17e161a8b6 100644
--- a/app/src/config/tabs/editorTab.ts
+++ b/app/src/config/tabs/editorTab.ts
@@ -123,21 +123,6 @@ const bindDatabaseAttrSettingsVisibility = (root: HTMLElement) => {
toggle();
};
-const bindHeadingNumberFormatVisibility = (root: HTMLElement) => {
- const headingNumberSwitch = root.querySelector<HTMLInputElement>(`#${CSS.escape("editor.headingNumber")}`);
- if (!headingNumberSwitch) {
- return;
- }
- const toggle = () => {
- root.querySelector(`#${CSS.escape("editor.headingNumberFormat")}`)?.closest(".config-item")?.classList.toggle(
- "fn__none",
- !headingNumberSwitch.checked,
- );
- };
- headingNumberSwitch.addEventListener("change", toggle);
- toggle();
-};
-
const registerEditorBlockFeaturesGroup = (tab: SettingTabBuilder) => {
const group = tab.group("blockFeatures", window.siyuan.languages.configGroupBlockFeatures);
group.switch("editor.displayNetImgMark", {
@@ -155,7 +140,6 @@ const registerEditorBlockFeaturesGroup = (tab: SettingTabBuilder) => {
group.switch("editor.headingNumber", {
title: window.siyuan.languages.headingNumber,
desc: window.siyuan.languages.headingNumberTip,
- afterMount: bindHeadingNumberFormatVisibility,
});
group.select("editor.headingNumberFormat", {
title: window.siyuan.languages.headingNumberFormat,