mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 06:41:44 +08:00
✨ 提供插入块、更新块和删除块的 API https://github.com/siyuan-note/siyuan/issues/3334
This commit is contained in:
parent
4dbf66d441
commit
337e93b4f6
36
API.md
36
API.md
@ -522,6 +522,42 @@
|
|||||||
|
|
||||||
* `action.data`:更新块生成的 DOM
|
* `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
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## 属性
|
## 属性
|
||||||
|
|
||||||
### 设置块属性
|
### 设置块属性
|
||||||
|
Loading…
Reference in New Issue
Block a user