File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ An HTML to React parser:
1313Parser(htmlString[, options])
1414```
1515
16- The parser converts a string of HTML to [ React Element(s)] ( https://facebook.github.io/react/docs/glossary .html#react-elements ) .
16+ The parser converts an HTML string to [ React Element(s)] ( https://facebook.github.io/react/docs/react-api .html#creating- react-elements ) .
1717
1818There is also an option to [ replace] ( #replacedomnode ) element(s) with your own React Element(s) via the [ parser options] ( #options ) .
1919
@@ -25,6 +25,8 @@ Parser('<p>Hello, world!</p>');
2525// same output as `React.createElement('p', {}, 'Hello, world!')`
2626```
2727
28+ [ JSFiddle] ( https://jsfiddle.net/remarkablemark/7v86d800/ )
29+
2830## Installation
2931
3032[ NPM] ( https://www.npmjs.com/package/html-react-parser ) :
@@ -42,8 +44,9 @@ $ npm install html-react-parser@0.2
4244[ CDN] ( https://unpkg.com/html-react-parser/ ) :
4345
4446``` html
45- <!-- HTMLReactParser depends on React -->
47+ <!-- HTMLReactParser depends on React and ReactDOM -->
4648<script src =" https://unpkg.com/react@latest/dist/react.min.js" ></script >
49+ <script src =" https://unpkg.com/react-dom@latest/dist/react-dom.min.js" ></script >
4750<script src =" https://unpkg.com/html-react-parser@latest/dist/html-react-parser.min.js" ></script >
4851```
4952
You can’t perform that action at this time.
0 commit comments