ie7.html 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6. <title>ACE Editor StatusBar Demo</title>
  7. <style type="text/css" media="screen">
  8. /*!important without this top: 0; bottom: 0 doesn't work on old ie */
  9. body, html {
  10. position: absolute;
  11. top: 0px; bottom: 0; left: 0; right: 0;
  12. margin:0; padding:0;
  13. overflow:hidden
  14. }
  15. #editor {
  16. margin: 0;
  17. position: absolute;
  18. top: 0; bottom: 0; left: 0; right: 0;
  19. }
  20. </style>
  21. </head>
  22. <body>
  23. <pre id="editor">
  24. require("ace/ext/old_ie");
  25. // now ace will work even on ie7!
  26. var editor = ace.edit("editor");
  27. </pre>
  28. <script src="../build/src/ace.js"></script>
  29. <script src="../build/src/ext-old_ie.js"></script>
  30. <script>
  31. // before creating an editor patch up things for old ie
  32. require("ace/ext/old_ie");
  33. // now ace will work even on ie7!
  34. var editor = ace.edit("editor");
  35. editor.setTheme("ace/theme/textmate");
  36. editor.session.setMode("ace/mode/javascript");
  37. </script>
  38. </body>
  39. </html>