mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🩹
This commit is contained in:
parent
7690ca7c05
commit
e4b9feb4f6
1 changed files with 14 additions and 12 deletions
|
|
@ -363,18 +363,20 @@ export class Wnd {
|
|||
}
|
||||
}
|
||||
});
|
||||
const initData = currentTab.headElement.getAttribute("data-initdata");
|
||||
if (initData) {
|
||||
const json = JSON.parse(initData);
|
||||
currentTab.addModel(new Editor({
|
||||
tab: currentTab,
|
||||
blockId: json.blockId,
|
||||
mode: json.mode,
|
||||
action: typeof json.action === "string" ? [json.action] : json.action,
|
||||
scrollAttr: json.scrollAttr,
|
||||
}));
|
||||
currentTab.headElement.removeAttribute("data-initdata");
|
||||
return;
|
||||
if (currentTab) {
|
||||
const initData = currentTab.headElement.getAttribute("data-initdata");
|
||||
if (initData) {
|
||||
const json = JSON.parse(initData);
|
||||
currentTab.addModel(new Editor({
|
||||
tab: currentTab,
|
||||
blockId: json.blockId,
|
||||
mode: json.mode,
|
||||
action: typeof json.action === "string" ? [json.action] : json.action,
|
||||
scrollAttr: json.scrollAttr,
|
||||
}));
|
||||
currentTab.headElement.removeAttribute("data-initdata");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (currentTab && target === currentTab.headElement) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue