mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
This commit is contained in:
parent
4eda47bf2b
commit
1be46ef5fd
1 changed files with 7 additions and 2 deletions
|
|
@ -67,8 +67,13 @@ export const reloadSync = (app: App, data: { upsertRootIDs: string[], removeRoot
|
||||||
const allModels = getAllModels();
|
const allModels = getAllModels();
|
||||||
allModels.editor.forEach(item => {
|
allModels.editor.forEach(item => {
|
||||||
if (data.upsertRootIDs.includes(item.editor.protyle.block.rootID)) {
|
if (data.upsertRootIDs.includes(item.editor.protyle.block.rootID)) {
|
||||||
|
fetchPost("/api/block/getDocInfo", {
|
||||||
|
id: item.editor.protyle.block.rootID,
|
||||||
|
}, (response) => {
|
||||||
|
item.editor.protyle.wysiwyg.renderCustom(response.data.ial);
|
||||||
reloadProtyle(item.editor.protyle, false);
|
reloadProtyle(item.editor.protyle, false);
|
||||||
updateTitle(item.editor.protyle.block.rootID, item.parent, item.editor.protyle);
|
updateTitle(item.editor.protyle.block.rootID, item.parent, item.editor.protyle);
|
||||||
|
});
|
||||||
} else if (data.removeRootIDs.includes(item.editor.protyle.block.rootID)) {
|
} else if (data.removeRootIDs.includes(item.editor.protyle.block.rootID)) {
|
||||||
item.parent.parent.removeTab(item.parent.id, false, false);
|
item.parent.parent.removeTab(item.parent.id, false, false);
|
||||||
delete window.siyuan.storage[Constants.LOCAL_FILEPOSITION][item.editor.protyle.block.rootID];
|
delete window.siyuan.storage[Constants.LOCAL_FILEPOSITION][item.editor.protyle.block.rootID];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue