73bcce88
luigser
COMPONENTS
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
marked-element
==============
Element wrapper for the [marked](https://github.com/chjj/marked) library.
`<marked-element>` accepts Markdown source either via its `markdown` attribute:
```html
<marked-element markdown="`Markdown` is _awesome_!"></marked-element>
```
Or, you can provide it via a `<script type="text/markdown">` element child:
```html
<marked-element>
<script type="text/markdown">
Check out my markdown!
We can even embed elements without fear of the HTML parser mucking up their
textual representation:
<awesome-sauce>
<div>Oops, I'm about to forget to close this div.
</awesome-sauce>
</script>
</marked-element>
```
Note that the `<script type="text/markdown">` approach is _static_. Changes to
the script content will _not_ update the rendered markdown!
|