mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
🎨 Improve fold heading editing https://github.com/siyuan-note/siyuan/issues/15989
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
16e9dec9b3
commit
acd80f0136
1 changed files with 2 additions and 7 deletions
|
|
@ -1596,13 +1596,8 @@ func unfoldHeading(heading *ast.Node) {
|
||||||
heading.RemoveIALAttr("fold")
|
heading.RemoveIALAttr("fold")
|
||||||
heading.RemoveIALAttr("heading-fold")
|
heading.RemoveIALAttr("heading-fold")
|
||||||
|
|
||||||
evt := util.NewCmdResult("transactions", 0, util.PushModeBroadcast)
|
evt := util.NewCmdResult("unfoldHeading", 0, util.PushModeBroadcast)
|
||||||
fillBlockRefCount(children)
|
evt.Data = map[string]interface{}{"id": heading.ID}
|
||||||
evt.Data = []*Transaction{{
|
|
||||||
DoOperations: []*Operation{{Action: "unfoldHeading", ID: heading.ID, RetData: renderBlockDOMByNodes(children, NewLute())}},
|
|
||||||
UndoOperations: []*Operation{{Action: "foldHeading", ID: heading.ID}},
|
|
||||||
}}
|
|
||||||
|
|
||||||
util.PushEvent(evt)
|
util.PushEvent(evt)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue