Last active
November 3, 2024 09:40
-
-
Save esironal/7209a7c00cba5267321d to your computer and use it in GitHub Desktop.
Codemirror CDN
This file contains hidden or 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> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Code Mirror CDN</title> | |
<link rel="stylesheet" href="http://esironal.github.io/cmtouch/lib/codemirror.css"> | |
<link rel="stylesheet" href="http://esironal.github.io/cmtouch/addon/hint/show-hint.css"> | |
<script src="http://esironal.github.io/cmtouch/lib/codemirror.js"></script> | |
<script src="http://esironal.github.io/cmtouch/addon/hint/show-hint.js"></script> | |
<script src="http://esironal.github.io/cmtouch/addon/hint/xml-hint.js"></script> | |
<script src="http://esironal.github.io/cmtouch/addon/hint/html-hint.js"></script> | |
<script src="http://esironal.github.io/cmtouch/mode/xml/xml.js"></script> | |
<script src="http://esironal.github.io/cmtouch/mode/javascript/javascript.js"></script> | |
<script src="http://esironal.github.io/cmtouch/mode/css/css.js"></script> | |
<script src="http://esironal.github.io/cmtouch/mode/htmlmixed/htmlmixed.js"></script> | |
<script src="http://esironal.github.io/cmtouch/addon/selection/active-line.js"></script> | |
<script src="http://esironal.github.io/cmtouch/addon/edit/matchbrackets.js"></script> | |
<link rel="stylesheet" href="http://esironal.github.io/cmtouch/theme/neonsyntax.css"> | |
<style type="text/css"> | |
.CodeMirror { | |
font-size: 15px; | |
width: 100%, ; | |
height: 100%; | |
} | |
</style> | |
</head> | |
<body> | |
<!-- This is an awsome comment --> | |
<div id="code"></div> | |
<script type="text/javascript"> | |
CodeMirror.commands.autocomplete = function(cm) { | |
CodeMirror.showHint(cm, CodeMirror.hint.html); | |
} | |
window.onload = function() { | |
editor = CodeMirror(document.getElementById("code"), { | |
mode: "text/html", | |
theme: "neonsyntax", | |
lineWrapping: true, | |
lineNumbers: true, | |
styleActiveLine: true, | |
matchBrackets: true, | |
extraKeys: { | |
"Ctrl-Space": "autocomplete" | |
}, | |
value: "<!doctype html>\n<html>\n " + document.documentElement.innerHTML + "\n</html>" | |
}); | |
}; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please do not use this. Github.io was not intended to be used as a CDN