Polymer element wrapping CodeMirror (highlighting syntax, plugins and options)
Install with Bower:
bower install loicmarie/code-area
Then you wan use it as follow:
<code-area mode="javascript" line-numbers></code-area>
See official Polymer element documentation for more details on element and online demonstration. See also CodeMirror documentation for more configurable options
PRs are welcome !
First, make sure you have the Polymer CLI installed. Then run polymer serve
to serve your application locally.
$ polymer serve
$ polymer build
This will create a build/
folder with bundled/
and unbundled/
sub-folders
containing a bundled (Vulcanized) and unbundled builds, both run through HTML,
CSS, and JS optimizers.
You can serve the built versions by giving polymer serve
a folder to serve
from:
$ polymer serve build/bundled
$ polymer test
Your application is already set up to be tested via web-component-tester. Run polymer test
to run your application's test suite locally.