mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-14 00:16:13 +01:00
🎨 The embed block of a heading supports hiding the heading itself
This commit is contained in:
parent
a6e4baee99
commit
ee5eb01c52
23 changed files with 208 additions and 45 deletions
|
|
@ -59,7 +59,7 @@ export const blockRender = (protyle: IProtyle, element: Element, top?: number) =
|
|||
fetchPost("/api/search/getEmbedBlock", {
|
||||
embedBlockID: item.getAttribute("data-node-id"),
|
||||
includeIDs: promiseIds,
|
||||
headingMode: item.getAttribute("custom-heading-mode") === "1" ? 1 : 0,
|
||||
headingMode: ["0", "1", "2"].includes(item.getAttribute("custom-heading-mode")) ? parseInt(item.getAttribute("custom-heading-mode")) : window.siyuan.config.editor.headingEmbedMode,
|
||||
breadcrumb
|
||||
}, (response) => {
|
||||
renderEmbed(response.data.blocks || [], protyle, item, top);
|
||||
|
|
@ -74,7 +74,7 @@ export const blockRender = (protyle: IProtyle, element: Element, top?: number) =
|
|||
fetchPost("/api/search/getEmbedBlock", {
|
||||
embedBlockID: item.getAttribute("data-node-id"),
|
||||
includeIDs,
|
||||
headingMode: item.getAttribute("custom-heading-mode") === "1" ? 1 : 0,
|
||||
headingMode: ["0", "1", "2"].includes(item.getAttribute("custom-heading-mode")) ? parseInt(item.getAttribute("custom-heading-mode")) : window.siyuan.config.editor.headingEmbedMode,
|
||||
breadcrumb
|
||||
}, (response) => {
|
||||
renderEmbed(response.data.blocks || [], protyle, item, top);
|
||||
|
|
@ -89,7 +89,7 @@ export const blockRender = (protyle: IProtyle, element: Element, top?: number) =
|
|||
fetchPost("/api/search/searchEmbedBlock", {
|
||||
embedBlockID: item.getAttribute("data-node-id"),
|
||||
stmt: content,
|
||||
headingMode: item.getAttribute("custom-heading-mode") === "1" ? 1 : 0,
|
||||
headingMode: ["0", "1", "2"].includes(item.getAttribute("custom-heading-mode")) ? parseInt(item.getAttribute("custom-heading-mode")) : window.siyuan.config.editor.headingEmbedMode,
|
||||
excludeIDs: [item.getAttribute("data-node-id"), protyle.block.rootID],
|
||||
breadcrumb
|
||||
}, (response) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue