html-to-element

1.0.0 • Public • Published

HTML-to-Element

What does HTML-to-Element?

In one short sentence: "HTML-to-Element converts HTML from a string to a js dom element."

Install

npm install html-to-element -S

Import

import htmlToElement from 'html-to-element';

Examples:

  import htmlToElement from 'html-to-element';
  
  let element = htmlToElement(`<div id="example">
      <p>Example</p>
      <div style="width:200px">Click me!</div>
  </div>`);
  
  document.body.appendChild(element);

Package Sidebar

Install

npm i html-to-element

Weekly Downloads

8

Version

1.0.0

License

MIT

Last publish

Collaborators

  • kmathmann