diff --git a/src/main/frontend/handler/editor.cljs b/src/main/frontend/handler/editor.cljs index e905d4f82e..759339a487 100644 --- a/src/main/frontend/handler/editor.cljs +++ b/src/main/frontend/handler/editor.cljs @@ -3524,9 +3524,10 @@ (defn set-heading! [block-id format heading] - (if (and (= format :markdown) (not (true? heading))) + (if (= format :markdown) (let [repo (state/get-current-repo) block (db/entity [:block/uuid block-id]) + heading (if (true? heading) 2 heading) content' (commands/set-markdown-heading (:block/content block) heading)] (save-block! repo block-id content')) (do