diff --git a/src/main/frontend/handler/editor.cljs b/src/main/frontend/handler/editor.cljs index 59c384fab..6c183c8fd 100644 --- a/src/main/frontend/handler/editor.cljs +++ b/src/main/frontend/handler/editor.cljs @@ -23,7 +23,6 @@ [frontend.handler.common :as common-handler] [frontend.handler.db-based.editor :as db-editor-handler] [frontend.handler.db-based.property.util :as db-pu] - [frontend.handler.db-based.property :as db-property-handler] [frontend.handler.export.html :as export-html] [frontend.handler.export.text :as export-text] [frontend.handler.file-based.editor :as file-editor-handler] @@ -586,7 +585,7 @@ :ordered-list? ordered-list? :replace-empty-target? replace-empty-target?}) (when (and db-base? (seq properties)) - (db-property-handler/set-block-properties! (:block/uuid new-block) properties))) + (property-handler/set-block-properties! repo (:block/uuid new-block) properties))) (when edit-block? (if (and replace-empty-target? (string/blank? (:block/content last-block))) diff --git a/src/main/frontend/handler/property.cljs b/src/main/frontend/handler/property.cljs index 8063ff18b..2fdf6245c 100644 --- a/src/main/frontend/handler/property.cljs +++ b/src/main/frontend/handler/property.cljs @@ -55,3 +55,9 @@ (db-property-handler/batch-remove-property! block-ids key) (db-property-handler/batch-set-property! block-ids key value)) (file-property-handler/batch-set-block-property! block-ids key value))) + +(defn set-block-properties! + [repo block-id properties] + (assert (uuid? block-id)) + (when (config/db-based-graph? repo) + (db-property-handler/set-block-properties! block-id properties)))