File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,13 @@ Parser('<p>Hello, world!</p>');
2727
2828## Installation
2929
30+ [ NPM] ( https://www.npmjs.com/package/html-react-parser ) :
31+
3032``` sh
3133$ npm install html-react-parser
3234```
3335
34- Or you can download the script from a CDN:
36+ [ CDN] ( https://unpkg.com/html-react-parser/ ) :
3537
3638``` html
3739<!-- HTMLReactParser depends on React -->
@@ -113,7 +115,7 @@ The element is only replaced if a valid React Element is returned.
113115``` js
114116// with JSX
115117Parser (' <p id="replace">text</p>' , {
116- replace : (domNode ) => {
118+ replace : function (domNode ) {
117119 if (domNode .attribs && domNode .attribs .id === ' replace' ) {
118120 return < span> replaced< / span> ;
119121 }
@@ -189,9 +191,8 @@ $ npm run lint
189191
190192## Special Thanks
191193
192- - To [ htmlparser2] ( https://github.com/fb55/htmlparser2 ) .
193- - To all the [ contributors] ( https://github.com/remarkablemark/html-react-parser/graphs/contributors ) .
194- - To [ benox3] ( https://github.com/benox3 ) and [ tdlm] ( https://github.com/tdlm ) for their feedback and review.
194+ - [ html-dom-parser] ( https://github.com/remarkablemark/html-dom-parser )
195+ - [ Contributors] ( https://github.com/remarkablemark/html-react-parser/graphs/contributors )
195196
196197## License
197198
You can’t perform that action at this time.
0 commit comments