Skip to content

Commit 957867a

Browse files
committed
Update README
1 parent 35f2adf commit 957867a

File tree

2 files changed

+47
-2
lines changed

2 files changed

+47
-2
lines changed

README.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,46 @@
1-
# highlightjs-lang.js
1+
# highlightjs-lang.js
2+
3+
Highlight.js plugin for display language of syntax highlight.
4+
5+
## Usage
6+
7+
Download plugin and include file after highlight.js:
8+
```html
9+
<script src="path/to/highlight.min.js"></script>
10+
11+
<script src="path/to/highlightjs-lang.min.js"></script>
12+
```
13+
14+
Adding styles:
15+
```css
16+
.hljs-lang {
17+
background: #333;
18+
text-align: center;
19+
color: #fff;
20+
-webkit-touch-callout: none;
21+
-webkit-user-select: none;
22+
-khtml-user-select: none;
23+
-moz-user-select: none;
24+
-ms-user-select: none;
25+
user-select: none;
26+
}
27+
```
28+
29+
Initialize plugin after highlight.js:
30+
```js
31+
hljs.initHighlightingOnLoad();
32+
33+
hljs.initLangOnLoad();
34+
```
35+
36+
Here’s an equivalent way to calling `initLangBlock` using jQuery:
37+
```js
38+
$(document).ready(function() {
39+
$('code.hljs').each(function(i, block) {
40+
hljs.initLangBlock(block);
41+
});
42+
});
43+
```
44+
45+
---
46+
&copy; 2015 Yauheni Pakala | MIT License

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "highlightjs-lang.js",
33
"version": "1.0.0",
4-
"description": "Highlight.js plugin for show of used syntax language.",
4+
"description": "Highlight.js plugin for display language of syntax highlight.",
55
"main": "gulpfile.js",
66
"dependencies": {},
77
"devDependencies": {

0 commit comments

Comments
 (0)