1.1.2 • Published 3 years ago

@advanced-rest-client/arc-marked v1.1.2

Weekly downloads
586
License
Apache-2.0
Repository
github
Last release
3 years ago

arc-marked

A port of Polymer's marked-element to LitElement with additional big fixes.

Published on NPM

Tests and publishing

<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