This commit is contained in:
Vanessa 2022-06-20 22:10:20 +08:00
parent b8cbf50cc7
commit 370df7866c
3 changed files with 7 additions and 0 deletions

View file

@ -11,10 +11,12 @@ import {scrollCenter} from "../util/highlightById";
import {lockFile} from "../dialog/processSystem";
import {hasClosestByAttribute} from "../protyle/util/hasClosest";
import {setEditMode} from "../protyle/util/setEditMode";
import {hideElements} from "../protyle/ui/hideElements";
export const openMobileFileById = (id: string, hasContext?: boolean, action = [Constants.CB_GET_HL], pushStack = true) => {
window.localStorage.setItem(Constants.LOCAL_DOCINFO, JSON.stringify({id, hasContext, action}));
if (window.siyuan.mobileEditor) {
hideElements(["toolbar", "hint", "util"], window.siyuan.mobileEditor.protyle);
if (window.siyuan.mobileEditor.protyle.contentElement.classList.contains("fn__none")) {
setEditMode(window.siyuan.mobileEditor.protyle, "wysiwyg");
}