mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
🎨 插入块接口加入 nextID 参数 https://github.com/siyuan-note/siyuan/issues/6199
This commit is contained in:
parent
d15c7c5e4c
commit
2a4f533574
3 changed files with 33 additions and 5 deletions
|
|
@ -123,13 +123,16 @@ func insertBlock(c *gin.Context) {
|
|||
|
||||
data := arg["data"].(string)
|
||||
dataType := arg["dataType"].(string)
|
||||
var parentID, previousID string
|
||||
var parentID, previousID, nextID string
|
||||
if nil != arg["parentID"] {
|
||||
parentID = arg["parentID"].(string)
|
||||
}
|
||||
if nil != arg["previousID"] {
|
||||
previousID = arg["previousID"].(string)
|
||||
}
|
||||
if nil != arg["nextID"] {
|
||||
nextID = arg["nextID"].(string)
|
||||
}
|
||||
|
||||
if "markdown" == dataType {
|
||||
luteEngine := model.NewLute()
|
||||
|
|
@ -144,6 +147,7 @@ func insertBlock(c *gin.Context) {
|
|||
Data: data,
|
||||
ParentID: parentID,
|
||||
PreviousID: previousID,
|
||||
NextID: nextID,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue