mn-code
v0.0.6
Published
a component to display code with syntax highlight
Downloads
6
Maintainers
Readme
mn-code
A component to display code with syntax highlight
See the demo
Install
npm install --save mn-code
And bundle dependencies and main files in dist/ with your preferred tool.
Usage
Use the tag mn-code
and put your code
<mn-code class="js">
// a hello world
console.log('hello')
</mn-code>
the component automatically recognize the language, but if you want specify the language, using a css class. The following classes be available html
, css
, js
, and sh
(shell script).