summaryrefslogtreecommitdiff
path: root/codemirror_ui/lib/CodeMirror-2.3/demo/resize.html
diff options
context:
space:
mode:
Diffstat (limited to 'codemirror_ui/lib/CodeMirror-2.3/demo/resize.html')
-rw-r--r--codemirror_ui/lib/CodeMirror-2.3/demo/resize.html41
1 files changed, 41 insertions, 0 deletions
diff --git a/codemirror_ui/lib/CodeMirror-2.3/demo/resize.html b/codemirror_ui/lib/CodeMirror-2.3/demo/resize.html
new file mode 100644
index 0000000..e20c3fb
--- /dev/null
+++ b/codemirror_ui/lib/CodeMirror-2.3/demo/resize.html
@@ -0,0 +1,41 @@
+<!doctype html>
+<html>
+ <head>
+ <title>CodeMirror: Autoresize Demo</title>
+ <link rel="stylesheet" href="../lib/codemirror.css">
+ <script src="../lib/codemirror.js"></script>
+ <script src="../mode/css/css.js"></script>
+ <link rel="stylesheet" href="../doc/docs.css">
+
+ <style type="text/css">
+ .CodeMirror {
+ border: 1px solid #eee;
+ }
+ .CodeMirror-scroll {
+ height: auto;
+ overflow-y: hidden;
+ overflow-x: auto;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>CodeMirror: Autoresize demo</h1>
+
+ <form><textarea id="code" name="code">
+.CodeMirror-scroll {
+ height: auto;
+ overflow-y: hidden;
+ overflow-x: auto;
+}</textarea></form>
+
+<p>By setting a few CSS properties, CodeMirror can be made to
+automatically resize to fit its content.</p>
+
+ <script>
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
+ lineNumbers: true
+ });
+ </script>
+
+ </body>
+</html>