mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
This commit is contained in:
parent
7e41e00ca9
commit
ff2c6f845d
1 changed files with 8 additions and 6 deletions
|
|
@ -24,12 +24,14 @@ export const blockRender = (protyle: IProtyle, element: Element, top?: number) =
|
|||
// 需置于请求返回前,否则快速滚动会导致重复加载 https://ld246.com/article/1666857862494?r=88250
|
||||
item.setAttribute("data-render", "true");
|
||||
genRenderFrame(item);
|
||||
const embedElement = item.querySelector(".protyle-wysiwyg__embed");
|
||||
if (embedElement) {
|
||||
if (item.childElementCount > 3) {
|
||||
item.style.height = (item.clientHeight - 4) + "px"; // 减少抖动 https://ld246.com/article/1668669380171
|
||||
item.querySelectorAll(".protyle-wysiwyg__embed").forEach((embedItem) => {
|
||||
embedItem.remove();
|
||||
});
|
||||
for (let i = 1; i < item.children.length - 1; i++) {
|
||||
if (!item.children[i].classList.contains("protyle-cursor")) {
|
||||
item.children[i].remove();
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
const content = Lute.UnEscapeHTMLStr(item.getAttribute("data-content"));
|
||||
let breadcrumb: boolean | string = item.getAttribute("breadcrumb");
|
||||
|
|
@ -50,7 +52,7 @@ export const blockRender = (protyle: IProtyle, element: Element, top?: number) =
|
|||
"item",
|
||||
"protyle",
|
||||
"top",
|
||||
content)(fetchSyncPost,item,protyle,top);
|
||||
content)(fetchSyncPost, item, protyle, top);
|
||||
if (includeIDs instanceof Promise) {
|
||||
includeIDs.then((promiseIds) => {
|
||||
if (Array.isArray(promiseIds)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue