mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 Improve handling of copy block ref when including images https://github.com/siyuan-note/siyuan/issues/9317
This commit is contained in:
parent
82bed847e6
commit
121d33e74d
3 changed files with 21 additions and 0 deletions
|
|
@ -117,6 +117,13 @@ func GetBlockRefText(id string) string {
|
|||
return getNodeRefText(node)
|
||||
}
|
||||
|
||||
func GetDOMText(dom string) (ret string) {
|
||||
luteEngine := NewLute()
|
||||
tree := luteEngine.BlockDOM2Tree(dom)
|
||||
ret = renderBlockText(tree.Root, nil)
|
||||
return
|
||||
}
|
||||
|
||||
func getBlockRefText(id string, tree *parse.Tree) (ret string) {
|
||||
node := treenode.GetNodeInTree(tree, id)
|
||||
if nil == node {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue