CodeMirror scroll down - Javascript CodeMirror

Javascript examples for CodeMirror:Configuration

Description

CodeMirror scroll down

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <link rel="stylesheet" href="https://codemirror.net/doc/docs.css"> 
      <link rel="stylesheet" href="https://codemirror.net/lib/codemirror.css"> 
      <script src="https://codemirror.net/lib/codemirror.js"></script> 
      <script src="https://codemirror.net/mode/htmlmixed/htmlmixed.js"></script> 
      <style type="text/css">

.CodeMirror {float: left; width: 100%; height: 100%; }


      </style> 
   </head> 
   <body> 
      <div style="padding: 1px; position: absolute; margin: 0px; top: 0px; bottom: auto; left: 0px; right: 0px; width: auto; height: 24px; background: lightgrey;"> 
         <button>some action</button> 
      </div> 
      <div style="padding: 1px; position: absolute; margin: 0px; left: 0px; right: 0px; top: 28px; bottom: 0px; width: auto; height: auto; "> 
         <textarea id="content" name="content" style="display: none;"></textarea> 
      </div> 
      <script>
      var editor = CodeMirror.fromTextArea(document.getElementById('content'), {
        mode: 'application/x-httpd-php',
        lineNumbers: true/*w ww.ja va  2 s.c o  m*/
      });
    
      </script>  
   </body>
</html>

Related Tutorials