settings_menu.html 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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>Editor</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: 0;
  16. left: 0;
  17. right: 0;
  18. }
  19. </style>
  20. </head>
  21. <body>
  22. <pre id="editor"></pre>
  23. <!-- load ace -->
  24. <script src="../src/ace.js"></script>
  25. <!-- load ace settings_menu extension -->
  26. <script src="../src/ext-settings_menu.js"></script>
  27. <script>
  28. var editor = ace.edit("editor");
  29. ace.require('ace/ext/settings_menu').init(editor);
  30. editor.setTheme("ace/theme/twilight");
  31. editor.session.setMode("ace/mode/html");
  32. editor.commands.addCommands([{
  33. name: "showSettingsMenu",
  34. bindKey: {win: "Ctrl-q", mac: "Ctrl-q"},
  35. exec: function(editor) {
  36. editor.showSettingsMenu();
  37. },
  38. readOnly: true
  39. }]);
  40. </script>
  41. <script src="./show_own_source.js"></script>
  42. </body>
  43. </html>