🎨 Add kernel API /api/block/getChildBlocks Fix https://github.com/siyuan-note/siyuan/issues/8249

This commit is contained in:
Liang Ding 2023-05-13 21:50:32 +08:00
parent 897b1d5ccc
commit b3b891338b
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
5 changed files with 149 additions and 1 deletions

View file

@ -29,6 +29,7 @@
* [删除块](#删除块)
* [移动块](#移动块)
* [获取块 kramdown 源码](#获取块-kramdown-源码)
* [获取子块](#获取子块)
* [属性](#属性)
* [设置块属性](#设置块属性)
* [获取块属性](#获取块属性)
@ -762,6 +763,44 @@
}
```
### 获取子块
* `/api/block/getChildBlocks`
* 参数
```json
{
"id": "20230506212712-vt9ajwj"
}
```
* `id`:父块 ID
* 标题下方块也算作子块
* 返回值
```json
{
"code": 0,
"msg": "",
"data": [
{
"id": "20230512083858-mjdwkbn",
"type": "h",
"subType": "h1"
},
{
"id": "20230513213727-thswvfd",
"type": "s"
},
{
"id": "20230513213633-9lsj4ew",
"type": "l",
"subType": "u"
}
]
}
```
## 属性
### 设置块属性