This commit is contained in:
Vanessa 2023-06-01 20:50:49 +08:00
parent fd0893d8d8
commit 6806392b41
57 changed files with 271 additions and 360 deletions

View file

@ -7,9 +7,8 @@ import {hasClosestByAttribute, hasClosestByClassName} from "../util/hasClosest";
import {isMac} from "../util/compatibility";
import {setInlineStyle} from "../../util/assets";
import {fetchPost} from "../../util/fetch";
import {App} from "../../index";
export const initUI = (protyle: IProtyle, app: App) => {
export const initUI = (protyle: IProtyle) => {
protyle.contentElement = document.createElement("div");
protyle.contentElement.className = "protyle-content";
if (window.siyuan.config.editor.fullWidth) {
@ -25,7 +24,7 @@ export const initUI = (protyle: IProtyle, app: App) => {
}
protyle.contentElement.appendChild(protyle.wysiwyg.element);
if (!protyle.options.action.includes(Constants.CB_GET_HISTORY)) {
scrollEvent(app, protyle, protyle.contentElement);
scrollEvent(protyle, protyle.contentElement);
}
protyle.element.append(protyle.contentElement);
protyle.element.appendChild(protyle.preview.element);