mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-20 23:36:10 +01:00
This commit is contained in:
parent
d476ac09a3
commit
b569365ae1
3 changed files with 14 additions and 0 deletions
|
|
@ -496,6 +496,11 @@ export const openCardByData = async (app: App, cardsData: ICardData, cardType: T
|
|||
if (lastRange) {
|
||||
focusByRange(lastRange);
|
||||
}
|
||||
},
|
||||
resizeCallback(type: string) {
|
||||
if (type !== "d" && type !== "t" && editor) {
|
||||
editor.resize();
|
||||
}
|
||||
}
|
||||
});
|
||||
(dialog.element.querySelector(".b3-dialog__scrim") as HTMLElement).style.backgroundColor = "var(--b3-theme-background)";
|
||||
|
|
@ -509,6 +514,7 @@ export const openCardByData = async (app: App, cardsData: ICardData, cardType: T
|
|||
cardType,
|
||||
dialog
|
||||
});
|
||||
editor.resize();
|
||||
dialog.editors = {
|
||||
card: editor
|
||||
};
|
||||
|
|
|
|||
|
|
@ -57,6 +57,11 @@ export const viewCards = (app: App, deckID: string, title: string, deckType: "Tr
|
|||
window.siyuan.mobile.popEditor = null;
|
||||
}
|
||||
}
|
||||
},
|
||||
resizeCallback(type: string) {
|
||||
if (type !== "d" && type !== "t" && edit) {
|
||||
edit.resize();
|
||||
}
|
||||
}
|
||||
});
|
||||
if (response.data.blocks.length > 0) {
|
||||
|
|
@ -73,6 +78,7 @@ export const viewCards = (app: App, deckID: string, title: string, deckType: "Tr
|
|||
dialog.editors = {
|
||||
card: edit
|
||||
};
|
||||
edit.resize();
|
||||
getArticle(edit, dialog.element.querySelector(".b3-list-item--focus")?.getAttribute("data-id"));
|
||||
}
|
||||
const previousElement = dialog.element.querySelector('[data-type="previous"]');
|
||||
|
|
|
|||
|
|
@ -407,6 +407,7 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo
|
|||
breadcrumbDocName: true
|
||||
},
|
||||
});
|
||||
edit.resize();
|
||||
const unRefEdit = new Protyle(app, element.querySelector("#searchUnRefPreview") as HTMLElement, {
|
||||
blockId: "",
|
||||
render: {
|
||||
|
|
@ -414,6 +415,7 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo
|
|||
breadcrumbDocName: true
|
||||
},
|
||||
});
|
||||
unRefEdit.resize();
|
||||
if (closeCB) {
|
||||
if (data.layout === 1) {
|
||||
if (data.col) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue