README
<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