If you’re a frequent reader, no doubt you noticed an embedded Youtube video on a
post a couple of weeks ago. Youtube makes it pretty simple to embed videos, they
give you the entire iframe HTML code to use, but this wouldn’t really be Emacs
if we couldn’t make things just a little bit easier. Just add the snippet below
to your init file, and you’re good to go.
To use this, just write your org links in the following way (optionally adding a description).
When you export to HTML, this will produce that same inlined snippet that
Youtube specifies. The advantage (over simply writing out the iframe) is that
this link can be clicked in org-mode, and can be exported to other formats as
well.
Embedding Youtube videos with org-mode links
28 Jul 2015, by Artur Malabarba.The Power of Org-links post series
If you’re a frequent reader, no doubt you noticed an embedded Youtube video on a post a couple of weeks ago. Youtube makes it pretty simple to embed videos, they give you the entire
iframe
HTML code to use, but this wouldn’t really be Emacs if we couldn’t make things just a little bit easier. Just add the snippet below to your init file, and you’re good to go.To use this, just write your org links in the following way (optionally adding a description).
When you export to HTML, this will produce that same inlined snippet that Youtube specifies. The advantage (over simply writing out the
iframe
) is that this link can be clicked inorg-mode
, and can be exported to other formats as well.Tags: org-mode, init.el, emacs,
Transposing keybinds in Emacs »
« Fixing DOuble CApitals as you type
Related Posts
Define context-aware keys in Emacs in org-mode
Changing the org-mode ellipsis in org-mode
Better time-stamps in org-export in org-mode
Content © 2019, All rights reserved. Icons under CC3.0.