|
|
@@ -81,6 +81,7 @@
|
|
|
:editor/show-input nil
|
|
|
:editor/last-saved-cursor nil
|
|
|
:editor/editing? nil
|
|
|
+ :editor/last-edit-block-input-id nil
|
|
|
:editor/last-edit-block-id nil
|
|
|
:editor/in-composition? false
|
|
|
:editor/content {}
|
|
|
@@ -430,7 +431,7 @@
|
|
|
|
|
|
(defn get-last-edit-input-id
|
|
|
[]
|
|
|
- (:editor/last-edit-block-id @state))
|
|
|
+ (:editor/last-edit-block-input-id @state))
|
|
|
|
|
|
(defn editing?
|
|
|
[]
|
|
|
@@ -697,6 +698,10 @@
|
|
|
(get @state :editor/block))
|
|
|
|
|
|
(defn get-last-edit-block
|
|
|
+ []
|
|
|
+ (:editor/last-edit-block @state))
|
|
|
+
|
|
|
+(defn get-current-edit-block-and-position
|
|
|
[]
|
|
|
(let [edit-input-id (get-edit-input-id)
|
|
|
edit-block (get-edit-block)
|
|
|
@@ -727,7 +732,8 @@
|
|
|
(assoc
|
|
|
:editor/block block
|
|
|
:editor/editing? {edit-input-id true}
|
|
|
- :editor/last-edit-block-id edit-input-id
|
|
|
+ :editor/last-edit-block-input-id edit-input-id
|
|
|
+ :editor/last-edit-block block
|
|
|
:cursor-range cursor-range))))
|
|
|
|
|
|
(when-let [input (gdom/getElement edit-input-id)]
|