A highlight.js package for Meteor that's integrated with the core markdown
package and chuangbo:marked
!
$ meteor add simple:highlight.js
In Meteor 1.3 and above, you can and should simply use the highlight.js
package from npm directly! This Meteor-specific version is no longer maintained.
Call the methods as described in the Highlight.js docs: http://highlightjs.readthedocs.org/en/latest/api.html.
This package is completely integrated with two markdown packages on the client and the server. Just put a code block in your markdown code:
{{#markdown}}
```
code goes here
```
{{/markdown}}
And the code will automatically be highlighted. Provide a language hint by adding a keyword like this:
{{#markdown}}
```js
var x = function () {};
```
{{/markdown}}
This package works not only with the markdown helper, but with the Showdown.makeHtml
function in markdown
called directly as well. This means it also works with simple:markdown-templating
.
Please file a pull request on the markdown-integration.js
file!