Commit c7fdf5a3 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

CodeMirrorGadget: Add getSupportedTypeList Method

parent 7d6b0723
...@@ -108,6 +108,15 @@ ...@@ -108,6 +108,15 @@
this.editor.focus(); this.editor.focus();
}) })
.declareMethod('getSupportedTypeList', function () {
var result_list = [], key;
for (key in CodeMirror.mimeModes) {
if (CodeMirror.mimeModes.hasOwnProperty(key)) {
result_list.push(key);
}
}
return result_list;
})
.declareMethod('getContent', function () { .declareMethod('getContent', function () {
var form_data = {}; var form_data = {};
if (this.state.editable) { if (this.state.editable) {
......
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