Image syntax
Aaron Swartz
aaronsw at gmail.com
Wed Jul 27 14:53:47 EDT 2005
We've recently added support for images to the Markdown-based system
we're building. There are three major attributes we need to store:
* The image's id/url
* Its size
* Its placement (left, right, or center)
And then I guess there's alt text.
Your syntax sort of makes sense for full-size centered images, which
just so happen to be the only kind I can recall on Daring Fireball,
but a lot of people want more. (And exposing our users to raw HTML for
something so basic seems unreasonable.)
## Possibilities
Here's how Wikipedia does it:
[[Image:Gruber.jpg|300px|right|The Narrator, pictured with his family.]]
It's sort of ugly.
---
Here's something like what I previously considered:
![The Narrator, pictured with his family.](Gruber.jpg){300px, right}
It's a little cleaner, but still messy.
---
Here's how I'd do it under this syntax.
<Gruber.jpg> 300px right
(The Narrator, pictured with his family.)
Actually, that's not so bad.
More information about the Markdown-Discuss
mailing list