Browse Source

fix: code not saved when click the bottom line to add a new block

related to #5406
Tienson Qin 3 years ago
parent
commit
2eb5bbb6e8
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/main/frontend/extensions/code.cljs

+ 1 - 0
src/main/frontend/extensions/code.cljs

@@ -168,6 +168,7 @@
               new-content (if (string/blank? value)
                             (str prefix surfix)
                             (str prefix value "\n" surfix))]
+          (state/set-edit-content! (state/get-edit-input-id) new-content)
           (editor-handler/save-block-if-changed! block new-content))
 
         (:file-path config)