AMI Web Framework > Advanced Concepts > Using code mirror with AMI


Using Code Mirror with AMI

By default AMI ships with Code Mirror 6 integrated in it’s core, this allows you to quickly create code instances in your application.

Create a new code editor

In order to create a new code editor on your web page you simply have to create a new textarea with a special class called “form-editor”.

AMI will transform all textarea with this class to CodeMirror editors.

Basic example :

<textarea class="form-editor"></textarea>

Attributes Reference

AttributeDescription
data-langSpecify the language used in your editor
—bootstrap-versionSpecify the bootstrap version for your subapp (4/5)
—source-code-flavourChoose the source code flavour (legacy/module/vue-js)
Next
Docker