matreshka-binder-codemirror
CodeMirror binder creator for Matreshka.js
The binder creator returns a binder which initializes and binds CodeMirror instance created with fromTextArea
function to a property.
Usage
In browser environment (or whatever environment where Matreshka
is global variable) Matreshka.binders
namespace is extended.
const codeMirror = Matreshkabinders;this; // if you don't want to create the variablethis; objcode = 'alert("Hello World!");';
The bundle can be downloaded at gh-pages branch
In CJS environment Matreshka.binders
is not extended.
npm install --save matreshka-binder-codemirror
const codeMirror = ; // ... this;
Configuration
The function accepts one argument: configuration object which is passed into internal call of CodeMirror.fromTextArea
. Read the CodeMirror documentation for more info.
this;