From 3f123505b3dd5c2c4eb656b1e78615ab40b0fd18 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 5 Aug 2022 13:22:22 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/5468#issuecomment-1205468383 --- app/src/protyle/ui/initUI.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/protyle/ui/initUI.ts b/app/src/protyle/ui/initUI.ts index 43d7c81f2..6e19c7c93 100644 --- a/app/src/protyle/ui/initUI.ts +++ b/app/src/protyle/ui/initUI.ts @@ -7,6 +7,11 @@ import {Constants} from "../../constants"; export const initUI = (protyle: IProtyle) => { protyle.contentElement = document.createElement("div"); protyle.contentElement.className = "protyle-content"; + if (window.siyuan.config.editor.fullWidth) { + protyle.contentElement.setAttribute("data-fullwidth", "true"); + } else { + protyle.contentElement.removeAttribute("data-fullwidth"); + } if (protyle.options.render.background) { protyle.contentElement.appendChild(protyle.background.element); }