LoginSignup
1
1

More than 5 years have passed since last update.

CodeMirrorの設置

Last updated at Posted at 2016-07-08

CodeMirror

コピペでそのまま動きます
<link rel=stylesheet href="http://codemirror.net/lib/codemirror.css">
<script src="http://codemirror.net/lib/codemirror.js"></script>
<script src="http://codemirror.net/mode/xml/xml.js"></script>

<textarea id="txt">
<div>aa</div>
</textarea>

<script>
  var txt = document.getElementById("txt");
  var editor = CodeMirror.fromTextArea(txt, {
    lineNumbers: true
   ,lineWrapping: true
  });
  editor.setSize("100%", "100%");
</script>

txt.png

その他

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1