mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-11 23:22:33 +01:00
This commit is contained in:
parent
b8cbf50cc7
commit
370df7866c
3 changed files with 7 additions and 0 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue