HTML Output from image inserts in MMD doc
Followup from twitter from @mygeekdaddy.
In a MMD doc, I insert an image with the following syntax (image URL is live and works):
![Happy New Year][nye_img]
[nye_img]:http://verly.me/wp-content/uploads/2013/01/newyear2013.jpg width="400px" height="240px"
Previewing in Marked works and the HTML out put from Marked is:
<figure>
<img src="http://verly.me/wp-content/uploads/2013/01/newyear2013.jpg" alt="Happy New Year" id="nye_img" style="height:250px;width:400px;" />
<figcaption>Happy New Year</figcaption></figure>
The Marked HTML output doesn't include an expected "href" tag I've had with other applications that output to HTML format.
<a href="http://verly.me/wp-content/uploads/2013/01/newyear2013.jpg">
I'm just curious if this is how core MMD is supposed to handle image links when moving from MMD -> HTML or is this a programming choice in Marked. Thanks for the help.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 01 Jan, 2013 08:28 PM
There's no link syntax in your source, so I'm not sure why it would produce an href attribute… Can you show me a processor or application that does?
2 Posted by jason.verly on 01 Jan, 2013 09:27 PM
When inserting image directly in WP editor the corresponding HTML includes the "href" tag. Example of inserting image directly in to WP post via WP editor (v3.4.2):
I get the same syntax whether I'm loading an image directly into the post or with an image already in the media library.
Do you know if there is a way to add link syntax to pick an href tag from a MMD doc?
Support Staff 3 Posted by Brett on 01 Jan, 2013 10:17 PM
WordPress is creating your thumbnail and a link to the full size image automatically. It has nothing to do with Markdown, you'd have to generate both versions and create the link with a syntax like:
[](/full/size/imageurl.jpg)
4 Posted by jason.verly on 02 Jan, 2013 12:09 AM
Thanks for the suggestion and the quick response.
Brett closed this discussion on 13 Jan, 2013 04:04 PM.