mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-27 09:24:06 +01:00
🎨 编辑器支持属性视图 - 表格 https://github.com/siyuan-note/siyuan/issues/7536
This commit is contained in:
parent
6b086ed1d3
commit
832f31cbb3
6 changed files with 111 additions and 56 deletions
|
|
@ -592,14 +592,7 @@ func removeBlocksDeckAttr(blockIDs []string, deckID string) (err error) {
|
|||
}
|
||||
|
||||
cache.PutBlockIAL(blockID, parse.IAL2Map(node.KramdownIAL))
|
||||
|
||||
newAttrs := parse.IAL2Map(node.KramdownIAL)
|
||||
doOp := &Operation{Action: "updateAttrs", Data: map[string]interface{}{"old": oldAttrs, "new": newAttrs}, ID: blockID}
|
||||
trans := []*Transaction{{
|
||||
DoOperations: []*Operation{doOp},
|
||||
UndoOperations: []*Operation{},
|
||||
}}
|
||||
pushBroadcastAttrTransactions(trans)
|
||||
pushBroadcastAttrTransactions(oldAttrs, node)
|
||||
}
|
||||
|
||||
return
|
||||
|
|
@ -674,14 +667,7 @@ func AddFlashcards(deckID string, blockIDs []string) (err error) {
|
|||
}
|
||||
|
||||
cache.PutBlockIAL(blockID, parse.IAL2Map(node.KramdownIAL))
|
||||
|
||||
newAttrs := parse.IAL2Map(node.KramdownIAL)
|
||||
doOp := &Operation{Action: "updateAttrs", Data: map[string]interface{}{"old": oldAttrs, "new": newAttrs}, ID: blockID}
|
||||
trans := []*Transaction{{
|
||||
DoOperations: []*Operation{doOp},
|
||||
UndoOperations: []*Operation{},
|
||||
}}
|
||||
pushBroadcastAttrTransactions(trans)
|
||||
pushBroadcastAttrTransactions(oldAttrs, node)
|
||||
}
|
||||
|
||||
deck := Decks[deckID]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue