feat(list): enable checkbox toggle

This commit is contained in:
llcc
2022-04-02 12:45:40 +08:00
committed by Tienson Qin
parent a1293513ec
commit 06465e658f
2 changed files with 17 additions and 4 deletions

View File

@@ -2339,6 +2339,11 @@
(cursor/move-cursor-backward input move-to-pos)))
(insert "\n")))))))
(defn toggle-list-checkbox
[{:block/keys [content] :as block} old-item-content new-item-content]
(let [new-content (string/replace-first content old-item-content new-item-content)]
(save-block-if-changed! block new-content)))
(defn- dwim-in-list
[_state]
(when-not (auto-complete?)