harunpehlivan
3/14/2018 - 10:55 PM

High Performance Code Editor For The Web

High Performance Code Editor For The Web

div{
  overflow: hidden;
}
.title{
  display: block;
  margin-bottom: 50px;
}
#editor { 
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
    }
 var editor = ace.edit("editor");
    editor.setTheme("ace/theme/monokai");
    editor.getSession().setMode("ace/mode/javascript");
    document.getElementById('editor').style.fontSize='16px';


<div class="title">
  <h2>
    Embedding Ace in Your Site
    link <a href="https://ace.c9.io/#nav=about"> link</a>
  </h2>
</div>

<div id="editor">
  function foo(items) {
    var x = "All this is syntax highlighted";
    return x;
}
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.1.3/ace.js"></script>