JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://ace.ajax.org/build/src/ace.js" type="text/javascript" charset="utf-8"></script>
<div class="myeditor" id="editor"></div>
CSS
#editor {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.ace_editor {
width:600px;
height:300px;
}
JavaScript
var myCode = new Array(50).join( 'codeLine\n' );
pos = 0;
editor = ace.edit("editor");
editor.setTheme("ace/theme/monokai");
editor.getSession().setMode("ace/mode/javascript");
editor.setValue(myCode, pos);
editor.scrollToLine(49);