🎨 Improve handling of copy block ref when including images https://github.com/siyuan-note/siyuan/issues/9317

This commit is contained in:
Daniel 2023-09-30 17:56:47 +08:00
parent 82bed847e6
commit 121d33e74d
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 21 additions and 0 deletions

View file

@ -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 {