1.1.2 • Published 3 years ago
@advanced-rest-client/arc-marked v1.1.2
arc-marked
A port of Polymer's marked-element to LitElement with additional big fixes.
<arc-marked>
<div slot="markdown-html"></div>
<script type="text/markdown">
## Markdown Renderer
<div>This is a HTML container</div>
Example:
```html
<paper-toolbar>
<paper-icon-button icon="menu"></paper-icon-button>
<div class="title">Title</div>
<paper-icon-button icon="more"></paper-icon-button>
</paper-toolbar>
```
_Nifty_ features.
</script>
</arc-marked>
Usage
Installation
npm install --save @advanced-rest-client/arc-marked
In an html file
<html>
<head>
<script type="module">
import '@advanced-rest-client/arc-marked/arc-marked.js';
</script>
</head>
<body>
<arc-marked markdown="..."></arc-marked>
</body>
</html>
In a LitElement
import { LitElement, html } from 'lit-element';
import '@advanced-rest-client/arc-marked/arc-marked.js';
class SampleElement extends LitElement {
render() {
return html`
<arc-marked .markdown="${this.markdown}"></arc-marked>
`;
}
}
customElements.define('sample-element', SampleElement);
Development
git clone https://github.com/advanced-rest-client/arc-marked
cd arc-marked
npm install
Running the demo locally
npm start
Running the tests
npm test