diff options
author | alexanders@b2ef00c0-3703-41da-baef-cfe82387ac0c <none@none> | 2010-02-03 00:48:31 +0000 |
---|---|---|
committer | alexanders@b2ef00c0-3703-41da-baef-cfe82387ac0c <none@none> | 2010-02-03 00:48:31 +0000 |
commit | 1a5e3c2d64be1c05a422fd78b23a31de155eca64 (patch) | |
tree | 71b2236dd23d409b0ce8a9576758123922b57898 /trunk/infrastructure/ace/build/index.html | |
parent | 4a9748e10084ca99fadec4f0fb1a3c22af7f3794 (diff) | |
download | etherpad-1a5e3c2d64be1c05a422fd78b23a31de155eca64.tar.gz etherpad-1a5e3c2d64be1c05a422fd78b23a31de155eca64.tar.xz etherpad-1a5e3c2d64be1c05a422fd78b23a31de155eca64.zip |
removed duplicate trunk directory
--HG--
extra : convert_revision : svn%3Ab2ef00c0-3703-41da-baef-cfe82387ac0c/trunk%404
Diffstat (limited to 'trunk/infrastructure/ace/build/index.html')
-rw-r--r-- | trunk/infrastructure/ace/build/index.html | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/trunk/infrastructure/ace/build/index.html b/trunk/infrastructure/ace/build/index.html new file mode 100644 index 0000000..b8c8505 --- /dev/null +++ b/trunk/infrastructure/ace/build/index.html @@ -0,0 +1,47 @@ +<!DOCTYPE html PUBLIC + "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <title>A Code Editor</title> + <script src="jquery-1.2.1.js"></script> + + <script src="testcode.js"></script> + <script src="ace2.js"></script> + <script> + $(document).ready(function() { + var editor = new Ace2Editor(); + editor.init("editorcontainer", getTestCode(), editorReady); + + editor.setOnKeyPress(function (evt) { + if (evt.ctrlKey && evt.which == "s".charCodeAt(0)) { + alert("You tried to save."); + return false; + } + return true; + }); + + function editorReady() { + resizeEditor(); + $(window).bind("resize", resizeEditor); + setTimeout(function() {editor.focus();}, 0); + } + + function resizeEditor() { + $("#editorcontainer").get(0).style.height = "100%"; + editor.getFrame().style.height = ((document.documentElement.clientHeight)-1)+"px"; + editor.adjustSize(); + } + }); + </script> + <style> + html { overflow: hidden } /* for Win IE 6 */ + body { margin:0; padding:0; border:0; overflow: hidden; } + #editorcontainer { height: 1000px; /* changed programmatically */ } + #editorcontainer iframe { width: 100%; height: 100%; border:0; padding:0; margin:0; } + </style> + </head> + <body> + <div id="editorcontainer"><!-- --></div> + </body> +</html> |