File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html >
3
+ < head >
4
+ < meta charset ="utf-8 " />
5
+ < title > Load with Script Tag</ title >
6
+ </ head >
7
+ < body style ="padding: 50px ">
8
+ < div id ="root "> </ div >
9
+
10
+ <!-- HTMLReactParser depends on React -->
11
+ < script src ="https://unpkg.com/react@latest/dist/react.min.js "> </ script >
12
+ < script src ="https://unpkg.com/html-react-parser@latest/dist/html-react-parser.min.js "> </ script >
13
+
14
+ <!-- ReactDOM -->
15
+ < script src ="https://unpkg.com/react-dom@latest/dist/react-dom.min.js "> </ script >
16
+ < script >
17
+ ReactDOM . render (
18
+ HTMLReactParser (
19
+ '<h2 style="font-family:\'Lucida Grande\';">' +
20
+ 'HTMLReactParser loaded with script tag' +
21
+ '<\/h2>'
22
+ ) ,
23
+ document . getElementById ( 'root' )
24
+ ) ;
25
+ </ script >
26
+ </ body >
27
+ </ html >
You can’t perform that action at this time.
0 commit comments