-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Set "title" attribute for images from markdown #985
Comments
I agree - this is a markdown extension, however, and as such extremely complicated to implement at present. |
At the moment, we're using showdown for markdown to html conversion. Showdown uses regular expressions, which gets us into all kinds of knots. I had to take out title support in order to have better URL support. At the moment, it's a trade-off. In the future we'll use a proper parser, and be able to handle advanced features such as this. |
Regarding the title: I propose to use
This would make it easy to add captions to images that are easy to style with CSS. @JohnONolan This isn't a Markdown extension. It's part of the original Markdown: http://daringfireball.net/projects/markdown/syntax#img I'd like to implement this if above format is accepted. |
@halfdan looks good... Would this result in this for no title?
or simple:
|
@Fasani: I guess to be consistent it should also result in |
Creating functionality like this is a lot less to do with what is and isn't a formal Markdown extension (you're right, it is) and a lot more to do with what is and isn't an extension of the Markdown-parsing-functionality which we have available to us (in which context, it absolutely is). We plan to rip out the guts of our current Markdown parsing implementation (which is hack++) and write our own engine, as this is obviously a very integral/core part of Ghost. Until then, as @ErisDS mentions, we heard you like REGEX so we put some REGEX in ur REGEX. ;) Which is not an ideal starting point for extending into more complex functionality. Enhancements like this are absolutely welcome - we're just not quite ready for them yet. |
Closing as wontfix against #1294 as it's pretty hard to get done before we rebuild the editor. |
It'd be nice if we could set the
title
attribute for images as well as thealt
attribute with the caption being entered in the markdown.The text was updated successfully, but these errors were encountered: