1.0.0-beta.3 • Published 3 years ago
strapi-plugin-codemirror v1.0.0-beta.3
Strapi plugin strapi-plugin-codemirror
Plugin enabling CodeMirror editor for Strapi textaera field.
Please keep in mind that the plugin replaces the textarea field.
How it works
The plugin replaces/overrides the textarea
field to a CodeMirror field.
The field's language can be configured by a model property named mode
which defines the CodeMirror mode (available modes).
How to install
- Under the root folder of your project run
NPM:
npm install strapi-plugin-codemirror --save
YARN:
yarn add strapi-plugin-codemirror
- Rebuild admin UI
strapi build
- Run strapi
strapi develop
How to use
You can define the mode
and theme
(not implemented yet) attribute as a field property.
Example:
in {your model}.settings.json:
"condition": {
"type": "text",
"mode": "javascript"
"theme": "material"
}
For the available modes read the CodeMirror documentation.
TODO
- Test every language mode
- Textarea fallback
- App level settings
⋅⋅⋅ Theme select