statusbar.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. body {
  9. overflow: hidden;
  10. }
  11. #editor {
  12. margin: 0;
  13. position: absolute;
  14. top: 0;
  15. bottom: 20px;
  16. left: 0;
  17. right: 0;
  18. }
  19. #statusBar {
  20. margin: 0;
  21. padding: 0;
  22. position: absolute;
  23. left: 0;
  24. right: 0;
  25. bottom: 0;
  26. height: 20px;
  27. background-color: rgb(245, 245, 245);
  28. color: gray;
  29. }
  30. .ace_status-indicator {
  31. color: gray;
  32. position: absolute;
  33. right: 0;
  34. border-left: 1px solid;
  35. }
  36. </style>
  37. </head>
  38. <body>
  39. <pre id="editor"></pre>
  40. <div id="statusBar">ace rocks!</div>
  41. <!-- load ace -->
  42. <script src="../src/ace.js"></script>
  43. <!-- load ace statusbar extension -->
  44. <script src="../src/ext-statusbar.js"></script>
  45. <script>
  46. var editor = ace.edit("editor");
  47. var StatusBar = ace.require("ace/ext/statusbar").StatusBar;
  48. // create a simple selection status indicator
  49. var statusBar = new StatusBar(editor, document.getElementById("statusBar"));
  50. editor.setTheme("ace/theme/dawn");
  51. editor.session.setMode("ace/mode/html");
  52. </script>
  53. <script src="./show_own_source.js"></script>
  54. </body>
  55. </html>