Vanessa 2025-12-31 11:42:24 +08:00
parent ba9c58ede6
commit c75a622043
4 changed files with 13 additions and 28 deletions

View file

@ -501,17 +501,7 @@ const editKeydown = (app: App, event: KeyboardEvent) => {
}
if (matchHotKey(window.siyuan.config.keymap.editor.general.wysiwyg.custom, event) && !protyle.options.backlinkData) {
setEditMode(protyle, "wysiwyg");
protyle.scroll.lastScrollTop = 0;
fetchPost("/api/filetree/getDoc", {
id: protyle.block.id,
size: protyle.block.id === protyle.block.rootID ? window.siyuan.config.editor.dynamicLoadBlocks : Constants.SIZE_GET_MAX,
}, getResponse => {
onGet({
data: getResponse,
protyle,
action: protyle.block.id === protyle.block.rootID ? [Constants.CB_GET_FOCUS, Constants.CB_GET_HTML, Constants.CB_GET_UNUNDO] : [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS, Constants.CB_GET_UNUNDO, Constants.CB_GET_HTML]
});
});
reloadProtyle(protyle, true);
saveLayout();
event.preventDefault();
return true;