提供插入块、更新块和删除块的 API https://github.com/siyuan-note/siyuan/issues/3334

This commit is contained in:
Liang Ding 2021-12-30 16:45:00 +08:00
parent 4dbf66d441
commit 337e93b4f6
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

36
API.md
View file

@ -522,6 +522,42 @@
* `action.data`:更新块生成的 DOM
### 删除块
* `/api/block/deleteBlock`
* 参数
```json
{
"id": "20211230161520-querkps"
}
```
* `id`:待删除块 ID
* 返回值
```json
{
"code": 0,
"msg": "",
"data": [
{
"doOperations": [
{
"action": "delete",
"data": null,
"id": "20211230162439-vtm09qo",
"parentID": "",
"previousID": "",
"retData": null
}
],
"undoOperations": null
}
]
}
```
## 属性
### 设置块属性