org-yt
org-yt copied to clipboard
change link with iframe when export
maybe these is better for export.
(defvar org-yt-iframe-format
;; You may want to change your width and height.
(concat "<iframe width=\"640\""
" height=\"480\""
" src=\"https://www.youtube.com/embed/%s\""
" frameborder=\"0\""
" allowfullscreen>%s</iframe>"))
(defun org-yt-export (video-id description backend ext-plist)
"Export youtube video with VIDEO-ID to BACKEND.
If DESCRIPTION is a string put it below the video.
EXT-PLIST is the data channel for the export backend."
(cl-case backend
(html (format org-yt-iframe-format
video-id (or description "")))
(latex (format "\href{%s}{%s}"
video-id (or description "video"))))
)