Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow height/width in images in user markdown/HTML #239

Closed
JasonBarnabe opened this issue Aug 19, 2014 · 2 comments
Closed

Allow height/width in images in user markdown/HTML #239

JasonBarnabe opened this issue Aug 19, 2014 · 2 comments

Comments

@JasonBarnabe
Copy link
Collaborator

No description provided.

@cletusc
Copy link

cletusc commented Aug 19, 2014

According to Daring Fireball:

As of this writing, Markdown has no syntax for specifying the dimensions of an image; if this is important to you, you can simply use regular HTML tags.

Looking around a bit, it looks like there are only a few markdown implementations that support a height/width within the markdown syntax for images, but they aren't standard across the board. IMO just support the height and width attributes of the img element, but force a max-height and max-width in the site CSS to prevent overflow.

I am -1 on height/width in markdown syntax images as it isn't standard.
I am +1 on height/width in HTML.

Markdown supports HTML within Markdown, so it shouldn't be too much of an issue for an author to use both if they absolutely need to.

Edit: ninja commit! Looks like you got it. :P

@JasonBarnabe
Copy link
Collaborator Author

After Markdown gets converted to HTML, it's passed through the same HTML filter as if you wrote HTML in the first place. I just added height/width on img to the whitelist, so if you can get Markdown to do height/width, now it'll be retained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants