From 4465397c2107fe308c1391c21d8bcc621ec37e47 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 10 Sep 2024 10:06:44 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/12424 --- app/appearance/langs/zh_CN.json | 1 + app/src/protyle/util/onGet.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json index dc9e03cf0..4d9ff176e 100644 --- a/app/appearance/langs/zh_CN.json +++ b/app/appearance/langs/zh_CN.json @@ -1,5 +1,6 @@ { "clearContextSucc": "上下文已清空", + "emptyMobilePlaceholder": "写点什么", "emptyPlaceholder": "写点什么,或按下 ' / ' 查看命令", "publish": "发布", "publishService": "发布服务", diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts index 38918ef2b..df8e20a30 100644 --- a/app/src/protyle/util/onGet.ts +++ b/app/src/protyle/util/onGet.ts @@ -186,7 +186,11 @@ const setHTML = (options: { const editElement = getContenteditableElement(protyle.wysiwyg.element.firstElementChild); if (editElement && editElement.textContent === "") { editElement.classList.add("protyle-wysiwyg--empty"); + /// #if MOBILE editElement.setAttribute("placeholder", window.siyuan.languages.emptyPlaceholder); + /// #else + editElement.setAttribute("placeholder", window.siyuan.languages.emptyPlaceholder); + /// #endif } }