mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🎨 Add kernel API /api/block/getChildBlocks Fix https://github.com/siyuan-note/siyuan/issues/8249
This commit is contained in:
parent
897b1d5ccc
commit
b3b891338b
5 changed files with 149 additions and 1 deletions
39
API_zh_CN.md
39
API_zh_CN.md
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## 属性
|
||||
|
||||
### 设置块属性
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue