|
@@ -67,12 +67,6 @@
|
|
|
(outliner-tree/blocks->vec-tree (str (:block/uuid block)))
|
|
(outliner-tree/blocks->vec-tree (str (:block/uuid block)))
|
|
|
(outliner-file/tree->file-content {:init-level 1})))
|
|
(outliner-file/tree->file-content {:init-level 1})))
|
|
|
|
|
|
|
|
-(defn copy-block!
|
|
|
|
|
- [block-id]
|
|
|
|
|
- (when-let [block (db/pull [:block/uuid block-id])]
|
|
|
|
|
- (let [content (:block/content block)]
|
|
|
|
|
- (common-handler/copy-to-clipboard-without-id-property! (:block/format block) content))))
|
|
|
|
|
-
|
|
|
|
|
(defn copy-block-as-json!
|
|
(defn copy-block-as-json!
|
|
|
[block-id]
|
|
[block-id]
|
|
|
(when-let [repo (state/get-current-repo)]
|
|
(when-let [repo (state/get-current-repo)]
|
|
@@ -454,7 +448,7 @@
|
|
|
(clj->js (f (first names)))))]))))
|
|
(clj->js (f (first names)))))]))))
|
|
|
(remove nil?))))
|
|
(remove nil?))))
|
|
|
|
|
|
|
|
-(defn- export-blocks-as-opml
|
|
|
|
|
|
|
+(defn export-blocks-as-opml
|
|
|
[repo root-block-uuid]
|
|
[repo root-block-uuid]
|
|
|
(let [get-page&block-refs-by-query-aux (get-embed-and-refs-blocks-pages-aux)
|
|
(let [get-page&block-refs-by-query-aux (get-embed-and-refs-blocks-pages-aux)
|
|
|
f #(get-page&block-refs-by-query repo % get-page&block-refs-by-query-aux {:is-block? true})
|
|
f #(get-page&block-refs-by-query repo % get-page&block-refs-by-query-aux {:is-block? true})
|
|
@@ -468,8 +462,8 @@
|
|
|
"untitled"
|
|
"untitled"
|
|
|
(js/JSON.stringify (clj->js refs)))))
|
|
(js/JSON.stringify (clj->js refs)))))
|
|
|
|
|
|
|
|
-(defn- export-blocks-as-markdown
|
|
|
|
|
- [repo root-block-uuid]
|
|
|
|
|
|
|
+(defn export-blocks-as-markdown
|
|
|
|
|
+ [repo root-block-uuid indent-style]
|
|
|
(let [get-page&block-refs-by-query-aux (get-embed-and-refs-blocks-pages-aux)
|
|
(let [get-page&block-refs-by-query-aux (get-embed-and-refs-blocks-pages-aux)
|
|
|
f #(get-page&block-refs-by-query repo % get-page&block-refs-by-query-aux {:is-block? true})
|
|
f #(get-page&block-refs-by-query repo % get-page&block-refs-by-query-aux {:is-block? true})
|
|
|
root-block (db/entity [:block/uuid root-block-uuid])
|
|
root-block (db/entity [:block/uuid root-block-uuid])
|