Selaa lähdekoodia

fix(editor): logbook should not be editable

Andelf 4 vuotta sitten
vanhempi
sitoutus
61ef2750b1
1 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 5 5
      src/main/frontend/components/block.cljs

+ 5 - 5
src/main/frontend/components/block.cljs

@@ -1744,16 +1744,16 @@
         (editor-handler/unhighlight-blocks!)
         (let [f #(let [block (or (db/pull [:block/uuid (:block/uuid block)]) block)
                        cursor-range (util/caret-range (gdom/getElement block-id))
-                       new-content (:block/content block)
-                       content (-> (property/remove-built-in-properties (:block/format block)
-                                                                        content)
-                                   (drawer/remove-logbook))]
+                       {:block/keys [content format]} block
+                       content (->> content
+                                    (property/remove-built-in-properties format)
+                                    (drawer/remove-logbook))]
                    ;; save current editing block
                    (let [{:keys [value] :as state} (editor-handler/get-state)]
                      (editor-handler/save-block! state value))
                    (state/set-editing!
                     edit-input-id
-                    new-content
+                    content
                     block
                     cursor-range
                     false))]