code: def codemirror_script(self, inputid):
          
          varname = "{}_codemirror".format(inputid)
          html = self.get_codemirror_field_js()
          opts = self.codemirror_config()
  
          return html.format(varname=varname, inputid=inputid,
                             settings=json.dumps(opts, sort_keys=True))
docs: Build CodeMirror HTML script tag which contains CodeMirror init.
  
          Arguments:
              inputid (string): Input id.
  
          Returns:
              string: HTML for field CodeMirror instance.