Miss any of our Open RFC calls?Watch the recordings here! »

@advanced-rest-client/response-highlighter

3.0.3 • Public • Published

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

Install

npm i @advanced-rest-client/response-highlighter

DownloadsWeekly Downloads

136

Version

3.0.3

License

Apache-2.0

Unpacked Size

47.5 kB

Total Files

6

Last publish

Collaborators

  • avatar
  • avatar
  • avatar