2.0.0 • Published 8 years ago
dwayne-html v2.0.0
dwayne-html
Why?
The plugin is needed for inserting generated html into elements. You may also transform it (sanitize for example) before inserting it.
Be aware that generated html may contain dangerous scripts!
$ npm install --save dwayne-htmlUsage
import sanitizeHtml from 'sanitize-html';
import Html from 'dwayne-html';
Html.transform = sanitizeHtml;<script>
import Html from 'dwayne-html';
</script>
<div Html="{html}"/>API
Set Html.transform to the function that transforms the html.