From 598fb59143440e8aceca585e79156395fa268741 Mon Sep 17 00:00:00 2001 From: Jeffrey Chen <78434827+TCOTC@users.noreply.github.com> Date: Thu, 12 Mar 2026 16:24:55 +0800 Subject: [PATCH] :art: Support setting document title to empty https://github.com/siyuan-note/siyuan/pull/17110#issuecomment-4043784534 (#17190) --- app/src/protyle/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/protyle/index.ts b/app/src/protyle/index.ts index f25631d58..01373d77b 100644 --- a/app/src/protyle/index.ts +++ b/app/src/protyle/index.ts @@ -214,6 +214,11 @@ export class Protyle { } else { this.protyle.title.setTitle(data.data.title, data.data.empty); } + if (data.data.empty) { + this.protyle.wysiwyg.element.setAttribute(Constants.CUSTOM_SY_TITLE_EMPTY, "true"); + } else { + this.protyle.wysiwyg.element.removeAttribute(Constants.CUSTOM_SY_TITLE_EMPTY); + } } // update ref this.protyle.wysiwyg.element.querySelectorAll(`[data-type~="block-ref"][data-id="${data.data.id}"]`).forEach(item => {