Created
September 24, 2013 03:42
-
-
Save junhui/6680112 to your computer and use it in GitHub Desktop.
how to use code mirror
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
| <link rel="stylesheet" href="codemirror-3.16/lib/codemirror.css"> | |
| <link href="codemirror-3.16/theme/elegant.css" rel="stylesheet" type="text/css" /> | |
| <style type="text/css"> | |
| .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;} | |
| .CodeMirror { | |
| height: 100% | |
| } | |
| .CodeMirror-scroll { | |
| overflow-y: hidden; | |
| overflow-x: auto; | |
| } | |
| </style> | |
| <script src="codemirror-3.16/lib/codemirror.js"></script> | |
| <script src="codemirror-3.16/mode/xml/xml.js"></script> | |
| <script src="codemirror-3.16/mode/javascript/javascript.js"></script> | |
| <script src="codemirror-3.16/mode/css/css.js"></script> | |
| <script src="codemirror-3.16/mode/htmlmixed/htmlmixed.js"></script> | |
| <script src="codemirror-3.16/mode/htmlembedded/htmlembedded.js"></script> | |
| <script type="text/javascript"> | |
| var editor; | |
| $(function () { | |
| editor = CodeMirror.fromTextArea(document.getElementById("fileoutput"), { | |
| lineNumbers: true, | |
| matchBrackets: true, | |
| height: "500px", | |
| lineWrapping: true, | |
| indentUnit: 4, | |
| mode: "application/x-aspx" | |
| }); | |
| }); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment