Vanessa 2022-10-30 23:13:41 +08:00
parent 20e2e7b41a
commit b470885e75
21 changed files with 32 additions and 33 deletions

View file

@ -35,7 +35,6 @@ export abstract class Constants {
// size // size
public static readonly SIZE_TOOLBAR_HEIGHT: number = 42; public static readonly SIZE_TOOLBAR_HEIGHT: number = 42;
public static readonly SIZE_GET = 36;
public static readonly SIZE_GET_MAX = 102400; public static readonly SIZE_GET_MAX = 102400;
public static readonly SIZE_UNDO = 64; public static readonly SIZE_UNDO = 64;
public static readonly SIZE_TITLE = 512; public static readonly SIZE_TITLE = 512;

View file

@ -218,7 +218,7 @@ const switchEditor = (editor: Editor, options: IOpenFileOptions, allModels: IMod
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: options.id, id: options.id,
mode: (options.action && options.action.includes(Constants.CB_GET_CONTEXT)) ? 3 : 0, mode: (options.action && options.action.includes(Constants.CB_GET_CONTEXT)) ? 3 : 0,
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, editor.editor.protyle, options.action); onGet(getResponse, editor.editor.protyle, options.action);
// 大纲点击折叠标题下的内容时,需更新反链面板 // 大纲点击折叠标题下的内容时,需更新反链面板

View file

@ -142,7 +142,7 @@ export class Outline extends Model {
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: item.editor.protyle.block.rootID, id: item.editor.protyle.block.rootID,
mode: 0, mode: 0,
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, item.editor.protyle, [Constants.CB_GET_FOCUS]); onGet(getResponse, item.editor.protyle, [Constants.CB_GET_FOCUS]);
}); });

View file

@ -451,7 +451,7 @@ export const zoomOut = (protyle: IProtyle, id: string, focusId?: string, isPushB
} }
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id, id,
size: id === protyle.block.rootID ? Constants.SIZE_GET : Constants.SIZE_GET_MAX, size: id === protyle.block.rootID ? window.siyuan.config.editor.dynamicLoadBlocks : Constants.SIZE_GET_MAX,
}, getResponse => { }, getResponse => {
if (isPushBack) { if (isPushBack) {
onGet(getResponse, protyle, id === protyle.block.rootID ? [Constants.CB_GET_FOCUS, Constants.CB_GET_HTML] : [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS, Constants.CB_GET_HTML]); onGet(getResponse, protyle, id === protyle.block.rootID ? [Constants.CB_GET_FOCUS, Constants.CB_GET_HTML] : [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS, Constants.CB_GET_HTML]);
@ -468,7 +468,7 @@ export const zoomOut = (protyle: IProtyle, id: string, focusId?: string, isPushB
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: focusId, id: focusId,
mode: 3, mode: 3,
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getFocusResponse => { }, getFocusResponse => {
onGet(getFocusResponse, protyle, isPushBack ? [Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS, Constants.CB_GET_UNUNDO]); onGet(getFocusResponse, protyle, isPushBack ? [Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS, Constants.CB_GET_UNUNDO]);
}); });

View file

@ -47,7 +47,7 @@ export const openMobileFileById = (id: string, action = [Constants.CB_GET_HL]) =
addLoading(window.siyuan.mobileEditor.protyle); addLoading(window.siyuan.mobileEditor.protyle);
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id, id,
size: action.includes(Constants.CB_GET_ALL) ? Constants.SIZE_GET_MAX : Constants.SIZE_GET, size: action.includes(Constants.CB_GET_ALL) ? Constants.SIZE_GET_MAX : window.siyuan.config.editor.dynamicLoadBlocks,
mode: action.includes(Constants.CB_GET_CONTEXT) ? 3 : 0, mode: action.includes(Constants.CB_GET_CONTEXT) ? 3 : 0,
}, getResponse => { }, getResponse => {
onGet(getResponse, window.siyuan.mobileEditor.protyle, action); onGet(getResponse, window.siyuan.mobileEditor.protyle, action);

View file

@ -144,7 +144,7 @@ export class MobileBacklinks {
if (response.data.refRootID === window.siyuan.mobileEditor.protyle.block.rootID) { if (response.data.refRootID === window.siyuan.mobileEditor.protyle.block.rootID) {
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: window.siyuan.mobileEditor.protyle.block.id, id: window.siyuan.mobileEditor.protyle.block.id,
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, window.siyuan.mobileEditor.protyle); onGet(getResponse, window.siyuan.mobileEditor.protyle);
}); });

View file

@ -21,7 +21,7 @@ export const netImg2LocalAssets = (protyle: IProtyle) => {
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: protyle.block.id, id: protyle.block.id,
mode: 0, mode: 0,
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, protyle, [Constants.CB_GET_FOCUS], saveScroll(protyle, true)); onGet(getResponse, protyle, [Constants.CB_GET_FOCUS], saveScroll(protyle, true));
}); });
@ -31,7 +31,7 @@ export const netImg2LocalAssets = (protyle: IProtyle) => {
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: item.editor.protyle.block.rootID, id: item.editor.protyle.block.rootID,
mode: 0, mode: 0,
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, item.editor.protyle, [Constants.CB_GET_FOCUS], saveScroll(protyle, true)); onGet(getResponse, item.editor.protyle, [Constants.CB_GET_FOCUS], saveScroll(protyle, true));
}); });

View file

@ -69,7 +69,7 @@ export class Breadcrumb {
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: protyle.options.blockId, id: protyle.options.blockId,
mode: 0, mode: 0,
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, protyle); onGet(getResponse, protyle);
}); });
@ -78,7 +78,7 @@ export class Breadcrumb {
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: protyle.options.blockId, id: protyle.options.blockId,
mode: 3, mode: 3,
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, protyle, [Constants.CB_GET_HL]); onGet(getResponse, protyle, [Constants.CB_GET_HL]);
}); });
@ -231,7 +231,7 @@ export class Breadcrumb {
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: protyle.block.id, id: protyle.block.id,
mode: 0, mode: 0,
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, protyle, [Constants.CB_GET_FOCUS], saveScroll(protyle, true)); onGet(getResponse, protyle, [Constants.CB_GET_FOCUS], saveScroll(protyle, true));
}); });
@ -241,7 +241,7 @@ export class Breadcrumb {
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: item.editor.protyle.block.rootID, id: item.editor.protyle.block.rootID,
mode: 0, mode: 0,
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, item.editor.protyle, [Constants.CB_GET_FOCUS], saveScroll(protyle, true)); onGet(getResponse, item.editor.protyle, [Constants.CB_GET_FOCUS], saveScroll(protyle, true));
}); });
@ -270,7 +270,7 @@ export class Breadcrumb {
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: protyle.block.showAll ? protyle.block.id : protyle.block.rootID, id: protyle.block.showAll ? protyle.block.id : protyle.block.rootID,
mode: 0, mode: 0,
size: protyle.block.showAll ? Constants.SIZE_GET_MAX : Constants.SIZE_GET, size: protyle.block.showAll ? Constants.SIZE_GET_MAX : window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, protyle, protyle.block.showAll ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS], saveScroll(protyle, true), true); onGet(getResponse, protyle, protyle.block.showAll ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS], saveScroll(protyle, true), true);
}); });
@ -296,7 +296,7 @@ export class Breadcrumb {
protyle.scroll.lastScrollTop = 0; protyle.scroll.lastScrollTop = 0;
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: protyle.block.rootID, id: protyle.block.rootID,
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, protyle); onGet(getResponse, protyle);
window.siyuan.menus.menu.remove(); window.siyuan.menus.menu.remove();

View file

@ -99,7 +99,7 @@ export class Protyle {
if (this.protyle.block.showAll && data.cmd === "heading2doc" && !this.protyle.options.backlinkData) { if (this.protyle.block.showAll && data.cmd === "heading2doc" && !this.protyle.options.backlinkData) {
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: this.protyle.block.rootID, id: this.protyle.block.rootID,
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, this.protyle); onGet(getResponse, this.protyle);
}); });
@ -167,7 +167,7 @@ export class Protyle {
id: options.blockId, id: options.blockId,
k: options.key || "", k: options.key || "",
mode: (mergedOptions.action && mergedOptions.action.includes(Constants.CB_GET_CONTEXT)) ? 3 : 0, // 0: 仅当前 ID默认值1向上 2向下3上下都加载4加载最后 mode: (mergedOptions.action && mergedOptions.action.includes(Constants.CB_GET_CONTEXT)) ? 3 : 0, // 0: 仅当前 ID默认值1向上 2向下3上下都加载4加载最后
size: mergedOptions.action?.includes(Constants.CB_GET_ALL) ? Constants.SIZE_GET_MAX : Constants.SIZE_GET, size: mergedOptions.action?.includes(Constants.CB_GET_ALL) ? Constants.SIZE_GET_MAX : window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, this.protyle, mergedOptions.action, options.scrollAttr); onGet(getResponse, this.protyle, mergedOptions.action, options.scrollAttr);
if (this.protyle.model) { if (this.protyle.model) {

View file

@ -82,7 +82,7 @@ export const scrollEvent = (protyle: IProtyle, element: HTMLElement) => {
id: protyle.wysiwyg.element.firstElementChild.getAttribute("data-node-id"), id: protyle.wysiwyg.element.firstElementChild.getAttribute("data-node-id"),
mode: 1, mode: 1,
k: protyle.options.key || "", k: protyle.options.key || "",
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
protyle.contentElement.style.overflow = ""; protyle.contentElement.style.overflow = "";
protyle.contentElement.style.width = ""; protyle.contentElement.style.width = "";
@ -97,7 +97,7 @@ export const scrollEvent = (protyle: IProtyle, element: HTMLElement) => {
id: protyle.wysiwyg.element.lastElementChild.getAttribute("data-node-id"), id: protyle.wysiwyg.element.lastElementChild.getAttribute("data-node-id"),
mode: 2, mode: 2,
k: protyle.options.key || "", k: protyle.options.key || "",
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, protyle, [Constants.CB_GET_APPEND, Constants.CB_GET_UNCHANGEID]); onGet(getResponse, protyle, [Constants.CB_GET_APPEND, Constants.CB_GET_UNCHANGEID]);
}); });

View file

@ -45,7 +45,7 @@ export class Scroll {
index: parseInt(this.inputElement.value), index: parseInt(this.inputElement.value),
id: protyle.block.parentID, id: protyle.block.parentID,
mode: 0, mode: 0,
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, protyle, [Constants.CB_GET_FOCUSFIRST, Constants.CB_GET_UNCHANGEID]); onGet(getResponse, protyle, [Constants.CB_GET_FOCUSFIRST, Constants.CB_GET_UNCHANGEID]);
}); });
@ -59,7 +59,7 @@ export class Scroll {
if (protyle.block.showAll) { if (protyle.block.showAll) {
this.element.classList.add("fn__none"); this.element.classList.add("fn__none");
} else { } else {
if (protyle.block.childBlockCount > Constants.SIZE_GET) { if (protyle.block.childBlockCount > window.siyuan.config.editor.dynamicLoadBlocks) {
this.element.classList.remove("fn__none"); this.element.classList.remove("fn__none");
} else { } else {
this.element.classList.add("fn__none"); this.element.classList.add("fn__none");

View file

@ -655,7 +655,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
}); });
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: protyle.block.id, id: protyle.block.id,
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, protyle); onGet(getResponse, protyle);
/// #if !MOBILE /// #if !MOBILE

View file

@ -272,7 +272,7 @@ const setHTML = (options: {
id: protyle.wysiwyg.element.lastElementChild.getAttribute("data-node-id"), id: protyle.wysiwyg.element.lastElementChild.getAttribute("data-node-id"),
mode: 2, mode: 2,
k: protyle.options.key || "", k: protyle.options.key || "",
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, protyle, [Constants.CB_GET_APPEND, Constants.CB_GET_UNCHANGEID]); onGet(getResponse, protyle, [Constants.CB_GET_APPEND, Constants.CB_GET_UNCHANGEID]);
}); });

View file

@ -28,7 +28,7 @@ export const reloadProtyle = (protyle: IProtyle) => {
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: protyle.block.showAll ? protyle.block.id : protyle.block.rootID, id: protyle.block.showAll ? protyle.block.id : protyle.block.rootID,
mode: 0, mode: 0,
size: protyle.block.showAll ? Constants.SIZE_GET_MAX : Constants.SIZE_GET, size: protyle.block.showAll ? Constants.SIZE_GET_MAX : window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, protyle, protyle.block.showAll ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS], saveScroll(protyle, true), true); onGet(getResponse, protyle, protyle.block.showAll ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS], saveScroll(protyle, true), true);
}); });

View file

@ -1212,7 +1212,7 @@ export class WYSIWYG {
id: protyle.wysiwyg.element.firstElementChild.getAttribute("data-node-id"), id: protyle.wysiwyg.element.firstElementChild.getAttribute("data-node-id"),
mode: 1, mode: 1,
k: protyle.options.key || "", k: protyle.options.key || "",
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
preventGetTopHTML = false; preventGetTopHTML = false;
onGet(getResponse, protyle, [Constants.CB_GET_BEFORE, Constants.CB_GET_UNCHANGEID]); onGet(getResponse, protyle, [Constants.CB_GET_BEFORE, Constants.CB_GET_UNCHANGEID]);

View file

@ -462,7 +462,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: protyle.block.rootID, id: protyle.block.rootID,
mode: 0, mode: 0,
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, protyle, [Constants.CB_GET_FOCUS]); onGet(getResponse, protyle, [Constants.CB_GET_FOCUS]);
}); });
@ -478,7 +478,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: protyle.block.rootID, id: protyle.block.rootID,
mode: 4, mode: 4,
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, protyle, [Constants.CB_GET_FOCUS]); onGet(getResponse, protyle, [Constants.CB_GET_FOCUS]);
}); });

View file

@ -108,7 +108,7 @@ const promiseTransaction = () => {
id: protyle.wysiwyg.element.lastElementChild.getAttribute("data-node-id"), id: protyle.wysiwyg.element.lastElementChild.getAttribute("data-node-id"),
mode: 2, mode: 2,
k: protyle.options.key || "", k: protyle.options.key || "",
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, protyle, [Constants.CB_GET_APPEND, Constants.CB_GET_UNCHANGEID]); onGet(getResponse, protyle, [Constants.CB_GET_APPEND, Constants.CB_GET_UNCHANGEID]);
}); });

View file

@ -187,7 +187,7 @@ export class Search extends Model {
id, id,
k: value, k: value,
mode: foldResponse.data ? 0 : 3, mode: foldResponse.data ? 0 : 3,
size: foldResponse.data ? Constants.SIZE_GET_MAX : Constants.SIZE_GET, size: foldResponse.data ? Constants.SIZE_GET_MAX : window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, this.protyle.protyle, foldResponse.data ? [Constants.CB_GET_ALL, Constants.CB_GET_HTML] : [Constants.CB_GET_HL, Constants.CB_GET_HTML]); onGet(getResponse, this.protyle.protyle, foldResponse.data ? [Constants.CB_GET_ALL, Constants.CB_GET_HTML] : [Constants.CB_GET_HL, Constants.CB_GET_HTML]);
const matchElement = this.protyle.protyle.wysiwyg.element.querySelector(`div[data-node-id="${id}"] span[data-type="search-mark"]`); const matchElement = this.protyle.protyle.wysiwyg.element.querySelector(`div[data-node-id="${id}"] span[data-type="search-mark"]`);

View file

@ -668,7 +668,7 @@ const getArticle = (options: {
id: options.id, id: options.id,
k: options.k, k: options.k,
mode: foldResponse.data ? 0 : 3, mode: foldResponse.data ? 0 : 3,
size: foldResponse.data ? Constants.SIZE_GET_MAX : Constants.SIZE_GET, size: foldResponse.data ? Constants.SIZE_GET_MAX : window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, protyle.protyle, foldResponse.data ? [Constants.CB_GET_ALL, Constants.CB_GET_HTML] : [Constants.CB_GET_HL, Constants.CB_GET_HTML]); onGet(getResponse, protyle.protyle, foldResponse.data ? [Constants.CB_GET_ALL, Constants.CB_GET_HTML] : [Constants.CB_GET_HL, Constants.CB_GET_HTML]);
const matchElement = protyle.protyle.wysiwyg.element.querySelector(`div[data-node-id="${options.id}"] span[data-type="search-mark"]`); const matchElement = protyle.protyle.wysiwyg.element.querySelector(`div[data-node-id="${options.id}"] span[data-type="search-mark"]`);

View file

@ -133,7 +133,7 @@ const focusStack = async (stack: IBackStack) => {
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: stack.id, id: stack.id,
mode: stack.isZoom ? 0 : 3, mode: stack.isZoom ? 0 : 3,
size: stack.isZoom ? Constants.SIZE_GET_MAX : Constants.SIZE_GET, size: stack.isZoom ? Constants.SIZE_GET_MAX : window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, stack.protyle, [Constants.CB_GET_HTML]); onGet(getResponse, stack.protyle, [Constants.CB_GET_HTML]);
Array.from(stack.protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${stack.id}"]`)).find(item => { Array.from(stack.protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${stack.id}"]`)).find(item => {
@ -162,7 +162,7 @@ const focusStack = async (stack: IBackStack) => {
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: stack.id, // 忘记为什么要用 rootChildID 了,但用了会产生 https://github.com/siyuan-note/siyuan/issues/6004 问题 id: stack.id, // 忘记为什么要用 rootChildID 了,但用了会产生 https://github.com/siyuan-note/siyuan/issues/6004 问题
mode: stack.isZoom ? 0 : 3, mode: stack.isZoom ? 0 : 3,
size: stack.isZoom ? Constants.SIZE_GET_MAX : Constants.SIZE_GET, size: stack.isZoom ? Constants.SIZE_GET_MAX : window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, stack.protyle, stack.isZoom ? [Constants.CB_GET_HTML, Constants.CB_GET_ALL] : [Constants.CB_GET_HTML]); onGet(getResponse, stack.protyle, stack.isZoom ? [Constants.CB_GET_HTML, Constants.CB_GET_ALL] : [Constants.CB_GET_HTML]);
Array.from(stack.protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${stack.id}"]`)).find(item => { Array.from(stack.protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${stack.id}"]`)).find(item => {

View file

@ -816,7 +816,7 @@ const editKeydown = (event: KeyboardEvent) => {
protyle.scroll.lastScrollTop = 0; protyle.scroll.lastScrollTop = 0;
fetchPost("/api/filetree/getDoc", { fetchPost("/api/filetree/getDoc", {
id: protyle.block.parentID, id: protyle.block.parentID,
size: Constants.SIZE_GET, size: window.siyuan.config.editor.dynamicLoadBlocks,
}, getResponse => { }, getResponse => {
onGet(getResponse, protyle); onGet(getResponse, protyle);
}); });