@@ -650,6 +650,7 @@ export interface IEditorProxy extends Record<string, any> {
) => Promise<void>
editBlock: (srcBlock: BlockIdentity, opts?: { pos: number }) => Promise<void>
+ selectBlock: (srcBlock: BlockIdentity) => Promise<void>
upsertBlockProperty: (
block: BlockIdentity,
@@ -442,6 +442,11 @@
[block-uuid]
(editor-handler/open-block-in-sidebar! (uuid block-uuid)))
+(def ^:export select_block
+ (fn [block-uuid]
+ (when-let [block (db-model/get-block-by-uuid block-uuid)]
+ (editor-handler/select-block! (:block/uuid block)) nil)))
+
(def ^:export edit_block
(fn [block-uuid ^js opts]
(when-let [block-uuid (and block-uuid (uuid block-uuid))]