Skip to content

Instantly share code, notes, and snippets.

@njx
Created January 14, 2013 21:09
Show Gist options
  • Save njx/4533514 to your computer and use it in GitHub Desktop.
Save njx/4533514 to your computer and use it in GitHub Desktop.
HTML file that doesn't yet properly reproduce a Brackets bug in CodeMirror.
<!doctype html>
<html>
<head>
<title>Horiz Resize Bug</title>
<link rel="stylesheet" href="lib/codemirror.css">
<script src="lib/codemirror.js"></script>
<link rel="stylesheet" href="doc/docs.css">
<style type="text/css">
.CodeMirror {border: 1px solid black; width: 200px;}
</style>
</head>
<body>
<h1>Horiz Resize Bug</h1>
<div id="editor"></div>
<script id="script">
window.onload = function() {
var content = "This is a line that's going to be wider than the editor window.";
window.editor = CodeMirror(document.getElementById("editor"), {
lineNumbers: true,
value: content
});
};
</script>
<input type="button" value="Resize 20px" onclick="window.editor.getWrapperElement().style.width='220px'">
<input type="button" value="Resize 400px" onclick="window.editor.getWrapperElement().style.width='600px'">
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment