JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://codemirror.net/doc/docs.css">
<link rel="stylesheet" href="http://codemirror.net/lib/codemirror.css">
<script src="http://codemirror.net/lib/codemirror.js"></script>
<script src="http://codemirror.net/mode/htmlmixed/htmlmixed.js"></script>
<style type="text/css">
.CodeMirror {
float: left;
width: 100%;
height: 100%;
}
</style>
<body>
<div id="header" style="position: fixed; height: 28px; z-index:999; width: 100%; background: lightgray;">
<button>Some action</button>
</div>
<div style="padding-top: 23px">
<textarea id="content" name="content"></textarea>
</div>
</body>
JavaScript
document.getElementById("content").value=Array(101).join("a\n");
var editor = CodeMirror.fromTextArea(document.getElementById('content'), {
mode: 'application/x-httpd-php',
lineNumbers: true
});