Summernote with CodeMirror

https://summernote.org/examples/#codemirror-as-codeview

 

    $(document).ready(function() {
      $('.summernote').summernote({
        height: 200,
        tabsize: 2,
        codemirror: {
          CodeMirrorConstructor: window.CodeMirror,
          mode: 'text/html',
          htmlMode: true,
          lineNumbers: true,
          theme: 'monokai'
        }
      });
    });