File tree Expand file tree Collapse file tree 1 file changed +36
-2
lines changed Expand file tree Collapse file tree 1 file changed +36
-2
lines changed Original file line number Diff line number Diff line change 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
+ © ; 2015 Pakalo Evgeniy | MIT License
You can’t perform that action at this time.
0 commit comments