enhance: undo redo use patches instead of full text

This commit is contained in:
Tienson Qin
2021-01-07 10:31:14 +08:00
parent 14e4af2957
commit 249bf680c1
10 changed files with 168 additions and 122 deletions

View File

@@ -436,11 +436,9 @@
remove-properties nil
auto-save? false}
:as opts}]
(let [value value
repo (or repo (state/get-current-repo))
(let [repo (or repo (state/get-current-repo))
e (db/entity repo [:block/uuid uuid])
block (assoc (with-block-meta repo block)
;; (into {} ...) to fix the old data
:block/properties (into {} (:block/properties e)))
format (or format (state/get-preferred-format))
page (db/entity repo (:db/id page))