File tree 1 file changed +7
-10
lines changed
1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change 12
12
npm i highlightjs-lang.js
13
13
```
14
14
15
- ### Bower
16
-
17
- ``` bash
18
- bower install highlightjs-lang
19
- ```
20
-
21
15
#### Getting the library from CDN
22
16
23
17
``` html
24
- <script src =" //cdn.jsdelivr.net/npm/highlightjs-lang.js@1.1.0 /dist/highlightjs-lang.min.js" ></script >
18
+ <script src =" https: //cdn.jsdelivr.net/npm/highlightjs-lang.js@latest /dist/highlightjs-lang.min.js" ></script >
25
19
```
26
20
27
- highlightjs-lang.js 1.1.0 is known to work with highlight.js 11.3.1.
21
+ highlightjs-lang.js 1.1.0 is known to work with highlight.js 11.3.1+
28
22
29
23
## Usage
30
24
@@ -33,6 +27,7 @@ Download plugin and include file after highlight.js:
33
27
``` html
34
28
<script src =" path/to/highlight.min.js" ></script >
35
29
30
+ <!-- Load plugin: -->
36
31
<script src =" path/to/highlightjs-lang.min.js" ></script >
37
32
```
38
33
@@ -57,7 +52,7 @@ Initialize plugin after highlight.js:
57
52
``` js
58
53
hljs .highlightAll ();
59
54
60
- hljs .initLangOnLoad ();
55
+ hljs .initLangOnLoad (); // <-- init plugin
61
56
```
62
57
63
58
Here’s an equivalent way to calling ` initLangBlock ` using jQuery:
@@ -99,9 +94,11 @@ If you want to override the default language name, you can specify a _overridden
99
94
100
95
``` js
101
96
var myOptions = {
97
+ // ...
102
98
overrideNames: {
103
99
cs: ' C#' ,
104
- }
100
+ },
101
+ // ...
105
102
};
106
103
```
107
104
You can’t perform that action at this time.
0 commit comments