fix: undo cursor

This commit is contained in:
Tienson Qin
2021-04-12 18:23:03 +08:00
parent 880560042b
commit d1359c3418
4 changed files with 9 additions and 3 deletions

View File

@@ -674,6 +674,7 @@
:block/container (gobj/get container "id"))
block)
content (or content "")]
(swap! state
(fn [state]
(-> state
@@ -682,7 +683,10 @@
:editor/block block
:editor/editing? {edit-input-id true}
:editor/last-edit-block-id edit-input-id
:cursor-range cursor-range)))))))
:cursor-range cursor-range))))
(let [input (gdom/getElement edit-input-id)]
(set! (.-value input) (string/trim content))))))
(defn clear-edit!
[]