/
Enable autocomplete for CodeMirror instances [5.3.0-B1]

Enable autocomplete for CodeMirror instances [5.3.0-B1]

In the  INP-1174 - Getting issue details... STATUS  the task the CodeMirror (see https://codemirror.net/) editor was added to enable syntax highlight in majority of textarea controls across Admin Console. Since that time CodeMirror has evolved to the level, that it now allows to use autocomplete (invoked by Ctrl+Space shortcut) for following languages:

  • JavaScript
  • XML
  • HTML
  • CSS
  • SQL

Proposing to upgrade CodeMirror version to make use of it's autocomplete features (search for "-hint" on https://codemirror.net/doc/manual.html page).

Solution

  1. upgrade CodeMirror to the latest version
  2. enable autocomplete by default by adding "extraKeys" CodeMirror option with {"Ctrl-Space": "autocomplete"} value to the instance code mirror options in the "inp_edit_codemirror" element
  3. enhance "adm:IncludeCodeMirrorFilesByLanguage" tag with ability to load corresponding autocomplete files based on language

Related Discussions

Related Tasks