Skip to content

Instantly share code, notes, and snippets.

@KMR-zoar
Created June 28, 2018 05:02
Show Gist options
  • Save KMR-zoar/df108d39b50618f08b65096e09a2fa63 to your computer and use it in GitHub Desktop.
Save KMR-zoar/df108d39b50618f08b65096e09a2fa63 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.39.0/codemirror.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.39.0/codemirror.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.39.0/mode/markdown/markdown.min.js"></script>
</head>
<body>
<textarea name="editor" id="editor_md" cols="30" rows="50"></textarea>
<script>
var mdEditor = CodeMirror.fromTextArea(document.getElementById('editor_md'), {
mode: "markdown",
lineNumbers: true,
indentUnit: 2
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment