@advanced-rest-client/response-highlighterdeprecated

An element that parses the HTTP response and displays highlighted result

Usage no npm install needed!

<script type="module">
  import advancedRestClientResponseHighlighter from 'https://cdn.skypack.dev/@advanced-rest-client/response-highlighter';
</script>

README

Published on NPM

Build Status

Published on webcomponents.org

<response-highlighter>

An element that parses the HTTP response and displays highlighted result.

<response-highlighter response-text="# Hello world" content-type="application/markdown"></response-highlighter>

Usage

Installation

npm install --save @advanced-rest-client/response-highlighter

In an html file

<html>
  <head>
    <script type="module">
      import '@advanced-rest-client/response-highlighter/response-highlighter.js';
    </script>
  </head>
  <body>
    <response-highlighter responsetext="Plain text" contenttype="text/plain"></response-highlighter>
  </body>
</html>

In a LitElement

import { LitElement, html } from 'lit-element';
import '@advanced-rest-client/response-highlighter/response-highlighter.js';

class SampleElement extends PolymerElement {
  render() {
    return html`
    <response-highlighter
      .responseText="${this.response}"
      .contentType="${this.contentType}"></response-highlighter>
    `;
  }
}
customElements.define('sample-element', SampleElement);

Development

git clone https://github.com/advanced-rest-client/response-highlighter
cd response-highlighter
npm install

Running the demo locally

npm start

Running the tests

npm test

API components

This components is a part of API components ecosystem