Problem
I want to create a page with a code editor embedded in it.I looked up codemirror
but i am having problems using it as i am new to java script.
<
There is another embeddable JavaScript code editor: CodeJar
Try Ace: https://github.com/ajaxorg/ace (source) http://ace.ajax.org/ (Project page), this JavaScript editor is used by Cloud9
I know this is old post , This is how i did while developing online code-editor you can use ace-editor
check this sample from ace
<html lang="en">
<head>
<title>ACE in Action</title>
<style type="text/css" media="screen">
#editor {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
</style>
</head>
<body>
<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.4.5/ace.js" type="text/javascript" charset="utf-8"></script>
<script>
var editor = ace.edit("editor");
editor.setTheme("ace/theme/monokai");
editor.session.setMode("ace/mode/javascript");
</script>
</body>
</html>