Video syntax

David Chambers david.chambers.05 at
Wed Sep 15 18:47:22 EDT 2010

On 16 September 2010 05:33, Waylan Limberg <waylan at> wrote:

The fact is, when I go back up and reread this message and get to the source

> <video> tag, all I see is `<video ` and think to myself, "oh, this is a

> video which gets inserted in the document" and I skip to the next block. It

> doesn't really make reading the document any more painful or difficult. And

> when writing, well, we need to include all that metadata anyway.

You make two excellent points here, Waylan, and I agree on both counts.

That said, I'm still keen to add some sort of support for shorthand to
Mango, as I personally would find this very helpful. The following, taken
from a post I wrote a year ago on embedding YouTube clips using valid XHTML
provides useful context:

<object class="youtube"
<param name="movie" value="" />
<param name="allowFullScreen" value="true" />

While this has not been updated to make use of the `video` element, it
demonstrates that the potential value of some sort of find and replace
mechanism. After all, that's exactly what I've been doing manually for the
last year: to embed a YouTube video I've pasted in the above snippet and
done a find and replace on "video_id". Since I'm styling the `object` via
CSS, I don't even include width and height.

Of course, this markup applies to YouTube but may not apply to other
services. That being the case, though, I'd still benefit from a `youtube:`
solution since 80% or more of the videos I embed are YouTube videos. The
fact that I'd need to include HTML for the other 20% does not deter me.

One thing that I'd like to make clear, Waylan, is that I'm raising the issue
on this list because it's a great place for such a discussion, *not* because
I'm expecting any of the Markdown implementations to support such syntax.

Last night another option occurred to me: `[Video: Soda Pop Stop](`.

The reason that I find this option so appealing is that the above remains
valid Markdown in non-Mango contexts. Mango will perform preprocessing to
convert this to the appropriate video markup, but without this preprocessing
the line would simply be converted to a descriptive link.

Sure, you could implement `![alt text](somerandomsite:key)`, but do you

> really want to update your code to support every new video host that comes

> along? Or would you provide some api by which the user could define his own?

> I don't know about you, but every time I link to some new video host from my

> blog, I don't want to have to update my code (even if I wrote it all myself)

> so markdown knows about the new site.

Django (on which Mango is built) offers a simple solution. Mango could, for
example, ship with three templates to handle video: video.html, vimeo.html,
and youtube.html. It could parse the video URLs to determine whether to
apply the YouTube template, the Vimeo template, or the generic (fallback)
template. Users would have the freedom both to add templates for other hosts
and to override the bundled templates.

I agree that updating application code to facilitate the embedding of
possibly just a single video is unreasonable, so I'll stick to pasting in
HTML in these cases.


On 16 September 2010 06:05, david parsons <orc at> wrote:

> On Thu, Sep 16, 2010 at 01:33:49AM +1200, David Chambers wrote:

> > I'm planning to update Mango <> to facilitate adding

> > video to Markdown documents. At the moment, of course, it's possible to

> > include video by including the appropriate HTML. There are three reasons,

> > though, that having syntax (official or unofficial) for video is a good

> > idea:

> >

> > - *Simplicity.* Writing something like [youtube:gPbh6Ru7VVM] is easy.

> > Including half a dozen lines of HTML is much less so.


> I don't know if it's feasable until a standard way of doing video

> emerges and the video-station websites start following it. A html5

> <video> block is lovely, but it's not very useful until the bulk of

> the web world can deal with it without complaint.


> > My question is, *has anyone given thought to an appropriate syntax for

> video

> > in Markdown?*


> Sure. We've got the framework for it:


> [text](object:[content-type:]url [=size] ['comment'])


> And then you can do something like


> [![no support for this content

> here](sorry.gif)](video:x-shockwave-flash:

> =425x328 'this may not be terse, but

> at least it's not naked html')


> [Honk!](audio:/~orc/klaxon.wav)



> without introducing (another form of) ascii spaghetti to the language.



> -david parsons

> _______________________________________________

> Markdown-Discuss mailing list

> Markdown-Discuss at



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Markdown-Discuss mailing list