mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🧑💻 Improve API exportMdContent https://github.com/siyuan-note/siyuan/issues/14032
This commit is contained in:
parent
9b2f439675
commit
5fca28ca81
2 changed files with 34 additions and 3 deletions
|
|
@ -410,7 +410,22 @@ func exportMdContent(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
hPath, content := model.ExportMarkdownContent(id)
|
||||
refMode := model.Conf.Export.BlockRefMode
|
||||
if nil != arg["refMode"] {
|
||||
refMode = arg["refMode"].(int)
|
||||
}
|
||||
|
||||
embedMode := model.Conf.Export.BlockEmbedMode
|
||||
if nil != arg["embedMode"] {
|
||||
embedMode = arg["embedMode"].(int)
|
||||
}
|
||||
|
||||
yfm := true
|
||||
if nil != arg["yfm"] {
|
||||
yfm = arg["yfm"].(bool)
|
||||
}
|
||||
|
||||
hPath, content := model.ExportMarkdownContent(id, refMode, embedMode, yfm)
|
||||
ret.Data = map[string]interface{}{
|
||||
"hPath": hPath,
|
||||
"content": content,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue