4
This README is automatically generated from the comments in these files:
7
Edit those files, and our readme bot will duplicate them over here!
8
Edit this file, and the bot will squash your changes :)
10
The bot does some handling of markdown. Please file a bug if it does the wrong
11
thing! https://github.com/PolymerLabs/tedium/issues
15
[![Build Status](https://travis-ci.org/PolymerElements/marked-element.svg?branch=master)](https://travis-ci.org/PolymerElements/marked-element)
18
##<marked-element>
20
Element wrapper for the [marked](https://github.com/chjj/marked) library.
22
`<marked-element>` accepts Markdown source, and renders it to a child
23
element with the class `markdown-html`. This child element can be styled
24
as you would a normal DOM element. If you do not provide a child element
25
with the `markdown-html` class, the Markdown source will still be rendered,
26
but to a shadow DOM child that cannot be styled.
28
The Markdown source can be specified either via the `markdown` attribute:
31
<marked-element markdown="`Markdown` is _awesome_!">
32
<div class="markdown-html"></div>
36
Or, you can provide it via a `<script type="text/markdown">` element child:
40
<div class="markdown-html"></div>
41
<script type="text/markdown">
42
Check out my markdown!
44
We can even embed elements without fear of the HTML parser mucking up their
45
textual representation:
49
<div>Oops, I'm about to forget to close this div.
56
Note that the `<script type="text/markdown">` approach is *static*. Changes to
57
the script content will *not* update the rendered markdown!
61
If you are using a child with the `markdown-html` class, you can style it
62
as you would a regular DOM element:
69
.markdown-html td:first-child {