mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-22 00:06:09 +01:00
This commit is contained in:
parent
ed44e92bbd
commit
35874e5075
3 changed files with 21 additions and 2 deletions
|
|
@ -13,6 +13,7 @@ import {App} from "../index";
|
|||
import {afterLoadPlugin} from "../plugin/loader";
|
||||
import {Tab} from "../layout/Tab";
|
||||
import {initWindowEvent} from "../boot/globalEvent/event";
|
||||
import {getAllEditor} from "../layout/getAll";
|
||||
|
||||
export const init = (app: App) => {
|
||||
webFrame.setZoomFactor(window.siyuan.storage[Constants.LOCAL_ZOOM]);
|
||||
|
|
@ -61,7 +62,15 @@ export const init = (app: App) => {
|
|||
resizeTimeout = window.setTimeout(() => {
|
||||
adjustLayout(window.siyuan.layout.centerLayout);
|
||||
resizeTabs();
|
||||
}, 200);
|
||||
if (getSelection().rangeCount > 0) {
|
||||
const range = getSelection().getRangeAt(0);
|
||||
getAllEditor().forEach(item => {
|
||||
if (item.protyle.wysiwyg.element.contains(range.startContainer)) {
|
||||
item.protyle.toolbar.render(item.protyle, range);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, Constants.TIMEOUT_RESIZE);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue