Created
November 23, 2015 23:38
-
-
Save mihailik/a8baccbeac8eae9a1be6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<title>CodeMirror</title> | |
<meta charset="utf-8"/> | |
<link rel=stylesheet href="https://codemirror.net/lib/codemirror.css"> | |
<script src="https://raw.githack.com/mihailik/CodeMirror/patch-7/lib/codemirror.js"></script> | |
<script src="https://codemirror.net/mode/xml/xml.js"></script> | |
<script src="https://codemirror.net/mode/javascript/javascript.js"></script> | |
<script src="https://codemirror.net/mode/css/css.js"></script> | |
<script src="https://codemirror.net/mode/htmlmixed/htmlmixed.js"></script> | |
<script src="https://codemirror.net/addon/edit/matchbrackets.js"></script> | |
<style> | |
.CodeMirror { | |
height: 100%; | |
} | |
</style> | |
<div id=host style="border: solid 2px red; height: 90%;"> | |
</div> | |
<script id=scr> | |
var editor; | |
window.onload = function() { | |
editor = CodeMirror(host, { | |
lineNumbers: true, | |
updateWhenComposing: true | |
}); | |
editor.getDoc().setValue(document.documentElement.outerHTML); | |
editor.focus(); | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment