Open kstubs opened 9 years ago
Markdown does not support YouTube anything but it does support HTML. Just paste the YouTube embed code directly into your document.
Not sure if I'm following you exactly. My challenge is: my document source is a Google Document. Google Documents do not support embeded videos so my solution is to provide the video via markdown code and then parse it on the client. This is working great, I'm just not sure how to add a different markdown output than what is currently being produced: an image that links to youtube video.
I have no idea how to solve your weird google docs thing. But in terms of markdown, markdown supports HTML :)
Lol. Ok forget Google Docs. The real question here is: how can I generate a custom markdown result?
You would have to write your own dialect
Do I provide a different dialect or function somehow?
Lol, how? Can you offer some tips?
I must admit the existing dialects are not the easiest to decipher, a section in the documentation about this would go a long way.
+1
Maybe a simpler example, this a dialect my co-worker made. Writing dialects might not be very straightforward, but it’s easier to do than in most Markdown implementations: https://github.com/aleray/markdown-js/blob/9373b6b4b435aff47ed533f1cf111b9c884d430a/src/dialects/aa.js
Your linked image solution seems a pretty efficient though :)
I'm using this in tiddlywiki plugin and I can't achieve to embed vimeo videos. It's supposed that markdown allow html embed, but this library does not:
<figure class="center">
<iframe src="https://player.vimeo.com/video/159057636" width="600" height="337" frameborder="0" allowfullscreen=""></iframe>
<figcaption>
<small>
<p><em><a href="http://www.rtve.es/alacarta/videos/telediario/telediario-15-horas-24-12-15/3421858/">Telediario 15:00</a></em> de TVE1 (24/12/2015). © RTVE 2015 (disponible <a href="/media/content/activities/La-lluna-plena/act3.webm">localment</a>).</p>
</small>
</figcaption>
</figure>
Related to fully support HTML
@deadlyicon markdown does support HTML but markdown-js escape HTML tags!
This works great to produce a link to a YouTube video, but if I want to produce YouTubes embed tag into my html, so basically an iFrame widget, how would I go about doing this? Do I provide a different dialect or function somehow?
Produces quite nicely: