Add function for inserting local image with proper export path
This commit is contained in:
parent
fd515b5266
commit
02b0369d87
1 changed files with 6 additions and 0 deletions
|
@ -13,3 +13,9 @@
|
||||||
(setq userdisplay (subst-char-in-string ?- ?_ theuser))
|
(setq userdisplay (subst-char-in-string ?- ?_ theuser))
|
||||||
(setq userlink (subst-char-in-string ?_ ?- theuser))
|
(setq userlink (subst-char-in-string ?_ ?- theuser))
|
||||||
(insert (concat "<a href=\"https://" userlink ".dreamwidth.org/profile\">/</a><a href=\"https://" userlink ".dreamwidth.org\">" userdisplay "</a>")))
|
(insert (concat "<a href=\"https://" userlink ".dreamwidth.org/profile\">/</a><a href=\"https://" userlink ".dreamwidth.org\">" userdisplay "</a>")))
|
||||||
|
|
||||||
|
(defun orgimg ()
|
||||||
|
"Insert an image and link to its external location"
|
||||||
|
(interactive)
|
||||||
|
(setq thefile (read-string "Image file name: "))
|
||||||
|
(insert "#+ATTR_HTML: :src /dw/" thefile "\n#+ATTR_HTML: :class noteimg\n[[file:~/Documents/drive/org/journal/media/" thefile "]]"))
|
Loading…
Add table
Add a link
Reference in a new issue