Commit a5291ef8 authored by iv's avatar iv Committed by Romain Courteaud

OfficeJS drive: Add some options to Codemirror gadget.

parent 7bec2c3d
......@@ -124,14 +124,15 @@
<script src="codemirror_mode_javascript.js"></script>\n
<script src="codemirror_addon_edit_matchbrackets.js"></script>\n
<script src="codemirror_keymap_vim.js"></script>\n
\n
<script src="codemirror_addon_display_fullscreen.js"></script>\n
<script src="codemirror_addon_dialog.js"></script>\n
<script src="gadget_codemirror.js" type="text/javascript"></script>\n
\n
<script src="gadget_codemirror.js" type="text/javascript"></script>\n
</head>\n
<body>\n
\n
<div class="codemirror_gadget"><textarea name="code"></textarea></div>\n
<div class="codemirror_gadget"><textarea name="code"></textarea></div>\n
\n
</body>\n
</html>\n
......@@ -272,7 +273,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>948.27247.18522.58589</string> </value>
<value> <string>948.62232.11308.64477</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -290,7 +291,7 @@
</tuple>
<state>
<tuple>
<float>1453133547.21</float>
<float>1454939427.73</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -122,7 +122,14 @@
keyMap: \'vim\',\n
matchBrackets: true,\n
showCursorWhenSelecting: true,\n
autofocus: false\n
tabSize: 4,\n
indentUnit: 4,\n
indentWithTabs: false,\n
extraKeys: {\n
"Alt-;": function (cm) {\n
cm.setOption("fullScreen", !cm.getOption("fullScreen"));\n
}\n
}\n
}\n
);\n
});\n
......@@ -133,6 +140,8 @@
CodeMirror.commands.save = function () {\n
gadget.submitData();\n
};\n
//console.log(gadget.props.element.querySelector(\'.editor\'));\n
\n
})\n
.declareMethod(\'getData\', function () {\n
return this.editor.getValue();\n
......@@ -276,7 +285,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>948.29057.44332.28194</string> </value>
<value> <string>948.62231.37965.8123</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -294,7 +303,7 @@
</tuple>
<state>
<tuple>
<float>1453133523.32</float>
<float>1454939611.03</float>
<string>UTC</string>
</tuple>
</state>
......
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