Snippet from dom element
Description
This tool to get a snippet from the dom element. The snippet has original open-close HTML tag with attributes and truncated inner text.
Install
For npm:
npm install --save snippet-from-dom-element
For yarn:
yarn add snippet-from-dom-element
Example
const element = document;const innerContentLength = 10;const snippet = ;console;// <h2 id="main-news-title">Breaking n...</h2>