mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-27 20:08:49 +01:00
🎨 查询嵌入块支持设置是否显示面包屑 https://github.com/siyuan-note/siyuan/issues/6184
This commit is contained in:
parent
c5e3a6ecf4
commit
25432c6912
8 changed files with 25 additions and 8 deletions
|
|
@ -381,7 +381,7 @@ func getBlock(id string) (ret *Block, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func getEmbeddedBlock(trees map[string]*parse.Tree, sqlBlock *sql.Block, headingMode int) (block *Block, blockPaths []*BlockPath) {
|
||||
func getEmbeddedBlock(trees map[string]*parse.Tree, sqlBlock *sql.Block, headingMode int, breadcrumb bool) (block *Block, blockPaths []*BlockPath) {
|
||||
tree, _ := trees[sqlBlock.RootID]
|
||||
if nil == tree {
|
||||
tree, _ = loadTreeByBlockID(sqlBlock.RootID)
|
||||
|
|
@ -434,8 +434,15 @@ func getEmbeddedBlock(trees map[string]*parse.Tree, sqlBlock *sql.Block, heading
|
|||
luteEngine.RenderOptions.ProtyleContenteditable = false // 不可编辑
|
||||
dom := renderBlockDOMByNodes(nodes, luteEngine)
|
||||
block = &Block{Box: def.Box, Path: def.Path, HPath: b.HPath, ID: def.ID, Type: def.Type.String(), Content: dom}
|
||||
if Conf.Editor.EmbedBlockBreadcrumb {
|
||||
blockPaths = buildBlockBreadcrumb(def)
|
||||
defBreadCrumb := def.IALAttr("breadcrumb")
|
||||
if "" != defBreadCrumb {
|
||||
if "true" == defBreadCrumb {
|
||||
blockPaths = buildBlockBreadcrumb(def)
|
||||
}
|
||||
} else {
|
||||
if Conf.Editor.EmbedBlockBreadcrumb {
|
||||
blockPaths = buildBlockBreadcrumb(def)
|
||||
}
|
||||
}
|
||||
if 1 > len(blockPaths) {
|
||||
blockPaths = []*BlockPath{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue