Source mode CodeMirror integration.
Access:
app.codemirror
app.getModule('codemirror')
app.invoke('codemirror.method', …)
create#
Creates a CodeMirror instance from a textarea element.
Parameters:
- params (
object) — command or form parameters
Returns: CodeMirror instance|null
app.codemirror.create({ el: textarea, height: '300px' });
getValue#
Returns CodeMirror value if active, otherwise the fallback html string.
Parameters:
- html (
string) — HTML string
Returns: string
app.codemirror.getValue(html);