Code editor in browser with easy customisations using CodeMirror.
After loading sifrr-code-editor
JS file as instructed in main readme. Put this in your html file:
<sifrr-code-editor lang="javascript"></sifrr-code-editor>
lang
attribute: language to use for highlighting syntax. Supported languages: All modes of codemirror - list, eg. html
, css
, javascript
, etc.
value
attribute: changing value attribute changes value of the editor.
You can get value of editor by property: element.value
You can set value of editor by property: element.value = 'new value'
theme
attribute: codemirror theme to use for syntax highlighting. default: dracula