You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The styles will most likely be in `node_modules/highlight.js/styles` folder.
24
38
25
39
Props:
40
+
26
41
* className: custom class name
27
42
* innerHTML: enable to render markup with dangerouslySetInnerHTML
28
-
*element: render code snippet inside specified element
43
+
*element: render code snippet inside specified element
29
44
30
45
#### Syntax highlighting of single code snippet
46
+
31
47
Code snippet that requires syntax highlighting should be passed as children to Highlight component in string format. Language name of code snippet should be specified as className.
32
48
33
49
```html
@@ -37,6 +53,7 @@ Code snippet that requires syntax highlighting should be passed as children to H
37
53
```
38
54
39
55
#### Syntax highlighting of mutiple code snippets
56
+
40
57
Set `innerHTML=true` to highlight multiple code snippets at atime.
41
58
This is especially usefull if html with multiple code snippets is generated from preprocesser tools like markdown.
42
59
@@ -47,7 +64,3 @@ This is especially usefull if html with multiple code snippets is generated from
0 commit comments