You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The below screenshot was captured from a [demo webpage](demo/testcode.html) after dropping `highlight.min.js` to a `dist` folder.
8
-
(Code taken from [Salesforce Trigger Framework](https://github.com/dschach/salesforce-trigger-framework) and Highlight Java example code)
15
+
The screenshot was captured from a [demo webpage](demo/testcode.html) after dropping `highlight.min.js` to a `dist` folder.
16
+
(Code taken from [Salesforce Trigger Framework](https://dschach.github.io/salesforce-trigger-framework/) and Highlight Java example code)
9
17

10
18
11
19
## Usage
12
20
13
-
Simply include the Highlight.js library in your webpage or Node app, then load this module.
21
+
Simply include the Highlight.js library in your webpage or Node app, then load this module. For more complex usage, see [highlight.js usage](https://github.com/highlightjs/highlight.js#basic-usage).
14
22
15
23
### Static website or simple usage
16
24
@@ -19,7 +27,8 @@ Simply load this module after loading Highlight.js. You'll use the minified vers
You need to import both Highlight.js and third-party language like Apex:
66
-
67
-
```js
68
-
importReact, {Component} from'react'
69
-
import'highlight.js/scss/vs.scss' # your favourite theme
70
-
importapexfrom'./apex'
71
-
importhljsfrom'highlight.js'
72
-
hljs.registerLanguage('apex', apex);
73
-
74
-
classHighlighterextendsComponent
75
-
{
76
-
constructor(props)
77
-
{
78
-
super(props);
79
-
hljs.highlightAll();
80
-
}
81
-
82
-
render()
83
-
{
84
-
let {children} =this.props;
85
-
return
86
-
{
87
-
<pre ref={(node) =>this.node= node}>
88
-
<code className="language-apex">
89
-
{children}
90
-
</code>
91
-
</pre>
92
-
}
93
-
}
94
-
}
95
-
96
-
exportdefaultHighlighter;
97
-
```
98
-
99
72
## License
100
73
101
74
Highlight.js is released under the BSD 3-Clause License. See [LICENSE](https://github.com/highlightjs/highlight.js/blob/main/LICENSE) file for details.
102
75
Highlightjs-apex is released under the MIT License. See [LICENSE](/LICENSE.md) file for details.
103
76
104
77
## Author
105
78
106
-
David Schach [[David Schach](https://github.com/dschach)](https://github.com/dschach)
79
+
David Schach [https://github.com/dschach](https://github.com/dschach)
0 commit comments