If you want plain text inside HTML isn't what the <pre> tag is for?
I decided to use it for a demos page on my site: http://mrcoles.com/demo/
Also, there's a bookmarklet at the top of the markdown-css demo that let's you apply the markdown styles to any page, which is like a harder-to-read version of readability or a quick way to see how well layed out the markup is on any page.
I, for one, will be adding this to http://ristrettolo.gy and http://combinators.info. Markup -> HTML -> Markup. It's a crazy world!
s/Markup/Markdown/ # ?i think it's mostly just for fun though / as an impressive CSS trick.
As much as I like kittens... This adds the markdown for images too:
.markdown img {
display: inline;
content: "";
}
.markdown img:before {
content: " ")";
display: inline;
color: #333333;
}
The trick to make it work with images is the `content: "";` on the img element to stop the browser from treating it as an image.EDIT:
See it here: http://jsfiddle.net/F2mjs/
Anyone know how to make the link clickable?
This was already in my code, but I commented out, maybe I should just let it be in there real quick before opera changes to webkit: https://github.com/mrcoles/markdown-css/blob/016bf0863867aed...
If not opera, lmk what browser you're using.
Oh, yes it is. Its in the .less file, I had not spotted that.
EDIT:
You need `content: "";` in the less file and it should work.
feel free to open up an issue on github to discuss the idea and implementation details further.
"'reStructuredText' is ONE word, not two!"
I'm definitely never going to type out that entire word, so now do I abbreviate it to reST? or ReST like some people on the site seem to be doing? It'll just get confused with REST in Google searches...
reStructuredText is 'heavier' and only really an improvement over Markdown if you're trying to embed page layout into the text. Which fewer people are.
curl -s example.com | pandoc -f html -t markdown -
[1]: http://johnmacfarlane.net/pandoc/https://github.com/mrcoles/markdown-css/blob/0d00981143172aa...
in the same vein as the h1 equals, i like the blockquote brackets implementation as well:
https://github.com/mrcoles/markdown-css/blob/0d00981143172aa...
It's a shame it doesn't work for copy-paste, but honestly, it's probably even easier to write a reverse-markdown script than to figure out how to do it with CSS!
Why don't you just output real markdown with something like Jekyll, Markdown Server (node) or Showdown?
Markdown is portable, fake markdown isn't.
Opera/9.80 (Macintosh; Intel Mac OS X 10.7.5) Presto/2.12.388 Version/12.14
[1]: I'm aware of projects like MMD, which AFAIK are primarily add-ons to the original Markdown syntax. I also realize that Markdown isn't perfect: Jeff Atwood has a good write-up on this from late 2009 -- http://www.codinghorror.com/blog/2009/12/responsible-open-so...
http://kevinburke.bitbucket.org/markdowncss/
HN discussion: http://news.ycombinator.com/item?id=2827892
In that way, the old school boys can still keep their pure-ASCII, and others may wish to apply some other CSS to make it more pleasant to read.
$ pandoc -f html -t markdown http://example.org/page.htm > page.mdwnFor an example use, view the source of http://dergachev.github.com/pin-screenshot-bookmarklet
I don't see how this is at all useful. Just upload a .md file.