mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-25 16:34:06 +01:00
This commit is contained in:
parent
66ee7d4715
commit
0337d12bef
6 changed files with 20 additions and 14 deletions
|
|
@ -12,6 +12,7 @@ import {lockFile} from "../dialog/processSystem";
|
|||
import {hasClosestByAttribute} from "../protyle/util/hasClosest";
|
||||
|
||||
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) {
|
||||
let blockElement;
|
||||
Array.from(window.siyuan.mobileEditor.protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${id}"]`)).find(item => {
|
||||
|
|
@ -83,7 +84,6 @@ export const openMobileFileById = (id: string, hasContext?: boolean, action = [C
|
|||
(document.getElementById("toolbarName") as HTMLInputElement).value = data.data.rootTitle;
|
||||
setEditor();
|
||||
closePanel();
|
||||
window.localStorage.setItem(Constants.LOCAL_DOC, id);
|
||||
if (pushStack) {
|
||||
window.siyuan.backStack.push({
|
||||
id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue