-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add kernel API /api/block/foldBlock
and /api/block/unfoldBlock
#9962
Comments
88250
changed the title
[ Api申请] 块折叠
Add kernel API Dec 24, 2023
/api/block/foldBlock
and /api/block/unfoldBlock
我觉得databack可以返回块当前的折叠状态,方便有时候执行switch操作 |
databack 是啥? |
88250
added a commit
that referenced
this issue
Dec 24, 2023
88250
added a commit
that referenced
this issue
Dec 24, 2023
就是调用API的返回值 |
调用 foldBlock 了的话就是折叠状态,调用 unfoldBlock 的话就是展开状态,应该不需要再判断了。 |
有的时候需要到当前的状态才能做切换的动作。真的其实有必要的。在有的场景下是明确的知道哪些元素该关,哪些元素该开。 有的时候在特殊的场景下也需要做状态的切换呀。这个切换背后的后台数据又不是由用户把控的,所以说想要用户把控的话就给一个反馈信息呗~ |
可以用 getBlockAttrs 获取块属性来判断折叠状态的。 |
好哦~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[ Api申请] 块折叠
In what scenarios do you need this feature?
需要一个块的折叠与展开的api操作,这样我可以写外部的脚本,快速的折叠 / 展开普通块或者标题。
这样会带来很高的效率,但是感觉官方的开源代码太复杂了,没有能力解读与应用。希望提供支持
Describe the optimal solution
无
Describe the candidate solution
API支持传入指定的非文档块ID,即可折叠对应的块
Other information
No response
The text was updated successfully, but these errors were encountered: