Commit ed1e9ec1 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Add Ace Editor settings menu (Alt+p) to set up keybinding styles for example.

parent e23040e5
......@@ -173,6 +173,8 @@
tal:attributes="src string:${portal_url}/ace/ace.js"></script>\n
<script type="text/javascript"\n
tal:attributes="src string:${portal_url}/ace/mode-python.js"></script>\n
<script type="text/javascript"\n
tal:attributes="src string:${portal_url}/ace/ext-settings_menu.js"></script>\n
<script type="text/javascript"\n
tal:define=\'fullscreen_button string:<input type="button" value="Fullscreen" onclick="switchToFullScreen()" class="ace_editor_action_button" />;\n
save_button string:<button class="ace_editor_save_button" onclick="saveDocument(event)"><img src="images/save2.png" width="30" height="30" border="0" /></button>;\'\n
......@@ -354,6 +356,15 @@
window.onresize = setContainerDivSize;\n
\n
ace_editor = ace.edit(\'${div_id}\');\n
\n
ace.require(\'ace/ext/settings_menu\').init(ace_editor);\n
ace_editor.commands.addCommands([{\n
name: \'showSettingsMenu\',\n
bindKey: {win: \'Alt-p\', mac: \'Alt-p\'},\n
exec: function(editor) { editor.showSettingsMenu(); },\n
readOnly: true\n
}]);\n
\n
ace_editor.resize();\n
\n
var PythonMode = require(\'ace/mode/python\').Mode;\n
......
2013-08-13 arnaud.fontaine
* ZODB Components: Add Ace Editor settings menu (Alt+p) to set up keybinding styles for example.
2013-08-13 arnaud.fontaine
* ZODB Components: Add JS file required to find text within Ace Editor.
......
11
\ No newline at end of file
12
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment