mirror of https://github.com/logseq/logseq
reuse existing function to format photo link
parent
e6fa1be618
commit
59d9fac5db
|
@ -57,12 +57,11 @@
|
||||||
|
|
||||||
:else " ")
|
:else " ")
|
||||||
format (:block/format block)]
|
format (:block/format block)]
|
||||||
(p/let [filename (save-photo)]
|
(p/let [filename (save-photo)
|
||||||
|
url (util/format "../assets/%s" filename)]
|
||||||
(commands/simple-insert!
|
(commands/simple-insert!
|
||||||
id
|
id
|
||||||
(str left-padding
|
(str left-padding
|
||||||
(case format
|
(editor-handler/get-asset-file-link format url filename true)
|
||||||
:org (util/format "[[../assets/%s]]" filename)
|
" ")
|
||||||
(util/format "![%s](../assets/%s)" filename filename))
|
|
||||||
" ")
|
|
||||||
{}))))
|
{}))))
|
||||||
|
|
Loading…
Reference in New Issue