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 } }