mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 数据历史文档支持只读可视化预览 https://github.com/siyuan-note/siyuan/issues/5735
This commit is contained in:
parent
a7230c0ece
commit
bdd6e6ea3e
2 changed files with 72 additions and 4 deletions
|
|
@ -116,7 +116,12 @@ func getDocHistoryContent(c *gin.Context) {
|
|||
}
|
||||
|
||||
historyPath := arg["historyPath"].(string)
|
||||
content, err := model.GetDocHistoryContent(historyPath)
|
||||
k := arg["k"]
|
||||
var keyword string
|
||||
if nil != k {
|
||||
keyword = k.(string)
|
||||
}
|
||||
content, isLargeDoc, err := model.GetDocHistoryContent(historyPath, keyword)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
|
@ -124,7 +129,8 @@ func getDocHistoryContent(c *gin.Context) {
|
|||
}
|
||||
|
||||
ret.Data = map[string]interface{}{
|
||||
"content": content,
|
||||
"content": content,
|
||||
"isLargeDoc": isLargeDoc,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue