[Feature request] Markdown - Embed Youtube Thumbnail in text

I’d like to make a suggestion: when saving an article, that the embedded YouTube videos are included in the article with a clickable thumbnail.

Code example:
[![IMAGE ALT TEXT](http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg)](http://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE "Video Title")

Welcome @paulpetro
The suggestion is noted, with no promises.

1 Like

Should the developers decide to implement something like this, I would like the result to clearly show that it’s a video link. Maybe the figcaption is enough, but here is a little inspiration:

This solution fetches the thumbnail and creates a new image with a “Play button” overlay. It can also output a GIF with frames from the video.

It has an API, though I don’t know enough about software licensing to comment on what’s possible.

@paulpetro If you’re not aware, an <iframe> embedded in markdown documents usually render fine in DT, so you can just embed the youtube video directly. (But I doubt that would be a good default)

1 Like

This is not MultiMarkdown syntax, afaict. And DT relies on the MMD renderer. So, the chances for this syntax to be included in DT are fairly slim, I suppose.

You could use an HTML video element to embed the video.

As to @troejgaard’s idea with the figcaption element: That would be possible if DT were to modify the MMD renderer to output certain links as figures. Again, I would not hold my breath.

IMO, the best approach right now might be to create a text snippet like
<figure><video ....><figcaption>...</figcaption></video>
or whatever you want to have in the rendered HTML, assign it to a keyboard shortcut had then fill in the … manually.

Alternatively, one could use a standard MD image link like
![Alternate text](https://youtube... "Description")
and have a JavaScript event handler run on DOMContentLoaded that modifies the HTML on the spot.

1 Like