mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 Improve export preview mode https://github.com/siyuan-note/siyuan/issues/11981
This commit is contained in:
@@ -580,10 +580,9 @@ func exportPreview(c *gin.Context) {
|
||||
}
|
||||
|
||||
id := arg["id"].(string)
|
||||
stdHTML, outline := model.Preview(id)
|
||||
stdHTML := model.Preview(id)
|
||||
ret.Data = map[string]interface{}{
|
||||
"html": stdHTML,
|
||||
"outline": outline,
|
||||
"html": stdHTML,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,8 +38,13 @@ func getDocOutline(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
preview := false
|
||||
if previewArg := arg["preview"]; nil != previewArg {
|
||||
preview = previewArg.(bool)
|
||||
}
|
||||
|
||||
rootID := arg["id"].(string)
|
||||
headings, err := model.Outline(rootID)
|
||||
headings, err := model.Outline(rootID, preview)
|
||||
if err != nil {
|
||||
ret.Code = 1
|
||||
ret.Msg = err.Error()
|
||||
|
||||
Reference in New Issue
Block a user