File tree 1 file changed +6
-5
lines changed
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>');
27
27
28
28
## Installation
29
29
30
+ [ NPM] ( https://www.npmjs.com/package/html-react-parser ) :
31
+
30
32
``` sh
31
33
$ npm install html-react-parser
32
34
```
33
35
34
- Or you can download the script from a CDN:
36
+ [ CDN] ( https://unpkg.com/html-react-parser/ ) :
35
37
36
38
``` html
37
39
<!-- HTMLReactParser depends on React -->
@@ -113,7 +115,7 @@ The element is only replaced if a valid React Element is returned.
113
115
``` js
114
116
// with JSX
115
117
Parser (' <p id="replace">text</p>' , {
116
- replace : (domNode ) => {
118
+ replace : function (domNode ) {
117
119
if (domNode .attribs && domNode .attribs .id === ' replace' ) {
118
120
return < span> replaced< / span> ;
119
121
}
@@ -189,9 +191,8 @@ $ npm run lint
189
191
190
192
## Special Thanks
191
193
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 )
195
196
196
197
## License
197
198
You can’t perform that action at this time.
0 commit comments