Pull request Compare This branch is 2 commits behind twobit:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
README.md
code.css
code.js
test.html
xtag.json

README.md

x-code

Creates a highlighted code snippet using highlight.js.

Usage

<x-code data-lang="javascript">function() {
    console.log('hi');
}
var foo=1, bar="baz";
</x-code>

Dynamically create an x-code tag:

var code = document.createElement('x-code');
code.text = 'var foo = "bar";';
document.body.appendChild(code);

Be sure to include code.css somewhere in your stylesheets.

See Highlight.js docs for more info.