Editron - script editor for html, js and css
npm install editron-script-editor
Add code editor for html and css.
npm i editron-script-editor --save
> Use bundled versions of this editor
Add the editor after the core-modules and it will register automatically (paths depend on your build-setup)
``html
`
> bundle the editor into your editron-application
#### Javascript
To use this editor within a webpack build, require the editor and add it to the editors list
`js`
const editronScriptEditor = require("editron-script-editor");
const editors = [
editronScriptEditor
...otherEditors
];
const editron = new Editron(schema, data, { editors });
#### Styles
Optionally import the custom script-editor styles via sass
`scss`
@import "editron-script-editor/editron-script-editor.scss";
or simply add the bundled css-file (path is depending on your build-setup)
`html`
The editor will be added for a matching schema like
`json`
{
"type": "string",
"format": "css"
}
`json`
{
"type": "string",
"format": "htmlmixed"
}
`json``
{
"type": "string",
"format": "javascript"
}