Skip to content

Commit e4a53fc

Browse files
committed
Updated README
1 parent a25bcf7 commit e4a53fc

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,36 @@
1-
# highlight-line-numbers.js
2-
Plugin for Highlight.js
1+
# highlightjs-line-numbers.js
2+
3+
Highlight.js line numbers plugin.
4+
5+
## Usage
6+
7+
Download plugin and include file after highlight.js:
8+
```
9+
<script src="highlight.min.js"></script>
10+
11+
<script src="highlightjs-line-numbers.js"></script>
12+
```
13+
14+
Adding styles:
15+
```css
16+
.hljs-line-numbers {
17+
text-align: right;
18+
border-right: 1px solid #ccc;
19+
color: #999;
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+
```
31+
hljs.initHighlightingOnLoad();
32+
33+
hljs.initLineNumbersOnLoad();
34+
```
35+
36+
&copy; 2015 Pakalo Evgeniy | MIT License

0 commit comments

Comments
 (0)