1.0.7 • Published 6 years ago

react-html-parser-ultimate v1.0.7

Weekly downloads
206
License
MIT
Repository
github
Last release
6 years ago

Build Status

react-html-parser-ultimate

A utility for converting HTML strings into React components

Installation

npm i react-html-parser-ultimate

or

yarn add react-html-parser-ultimate

Usage

import { parseHtml } from 'react-html-parser-ultimate';

parseHtml(html, {
    onTransform: (node, index, nodeToElementFn) => {
        if (node.name === 'div') {
            node.name = 'span';
            return nodeToElementFn(node, index);
        }
        return undefined;
    },
    allowScript: true,
});
1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago