$ npm install dom-to-string
Cross browser DOM to String converter.
npm install dom-to-string --save
const dom2str = require('dom-to-string'); var p = document.createElement('p'); p.innerHTML = "hello"; dom2str(p); // '<p>hello</p>'