fix(api): upsert block property should work with editing mode

pull/2085/head
charlie 2021-06-01 16:31:47 +08:00
parent 2cd0c5b3b8
commit 0f39c9631e
1 changed files with 5 additions and 3 deletions

View File

@ -853,9 +853,11 @@
:block/properties properties
:block/content content})]
(outliner-core/save-node block)
(let [opts {:key :block/change
:data [block]}]
(db/refresh! repo opts)))))))
;; update editing input content
(when-let [editing-block (state/get-edit-block)]
(and (= (:block/uuid editing-block) block-id)
(state/set-edit-content! (state/get-edit-input-id) content))))))))
(defn remove-block-property!
[block-id key]