File tree Expand file tree Collapse file tree 2 files changed +47
-2
lines changed Expand file tree Collapse file tree 2 files changed +47
-2
lines changed Original file line number Diff line number Diff line change 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+ © ; 2015 Yauheni Pakala | MIT License
Original file line number Diff line number Diff line change 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" : {
You can’t perform that action at this time.
0 commit comments