npm.io
2.0.2 • Published 4 years ago

@advanced-rest-client/highlight

Licence
Apache-2.0
Version
2.0.2
Deps
9
Size
140 kB
Vulns
16
Weekly
0
Stars
1

highlight

A set of tools to work with markdown content and other syntax highlighting.

This library replaces the old modules of:

  • @advanced-rest-client/markdown-styles
  • @advanced-rest-client/arc-marked
  • @advanced-rest-client/prism-highlight

Published on NPM

Tests and publishing

Usage

Installation

npm install --save @advanced-rest-client/highlight
MarkdownStyles

This should be used whenever the arc-marked is used.

import { MarkdownStyles } from '@advanced-rest-client/highlight';

export default class AnElement extends LitElement {
  get styles() {
    return [
      MarkdownStyles,
      css`
        ...
      `
    ];
  }
  ...
}
arc-marked

An element that specializes in markdown rendering.

<arc-marked markdown="***Bold and italic***">
  <div slot="markdown-html" class="markdown-html custom"></div>
</arc-marked>
<arc-marked>
  <div slot="markdown-html"></div>
  <script type="text/markdown">
    ## Markdown Renderer

    ...
  </script>
</arc-marked>

Development

git clone https://github.com/advanced-rest-client/arc-headers
cd arc-headers
npm install
Running the demo locally
npm start
Running the tests
npm test

Keywords