🎨 Add kernel API /api/block/foldBlock and /api/block/unfoldBlock https://github.com/siyuan-note/siyuan/issues/9962

This commit is contained in:
Daniel 2023-12-24 16:24:11 +08:00
parent 9403eef8b7
commit 584168acdb
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 92 additions and 0 deletions

View file

@ -29,6 +29,8 @@
* [更新块](#更新块)
* [删除块](#删除块)
* [移动块](#移动块)
* [折叠块](#折叠块)
* [展开块](#展开块)
* [获取块 kramdown 源码](#获取块-kramdown-源码)
* [获取子块](#获取子块)
* [转移块引用](#转移块引用)
@ -776,6 +778,50 @@
}
```
### 折叠块
* `/api/block/foldBlock`
* 参数
```json
{
"id": "20231224160424-2f5680o"
}
```
* `id`:待折叠块的 ID
* 返回值
```json
{
"code": 0,
"msg": "",
"data": null
}
```
### 展开块
* `/api/block/unfoldBlock`
* 参数
```json
{
"id": "20231224160424-2f5680o"
}
```
* `id`:待展开块的 ID
* 返回值
```json
{
"code": 0,
"msg": "",
"data": null
}
```
### 获取块 kramdown 源码
* `/api/block/getBlockKramdown`