Commit f56729db by cahrens

Turn off line wrapping.

parent dd50313f
......@@ -56,17 +56,22 @@ CMS.Views.Settings.Advanced = CMS.Views.ValidatingView.extend({
attachJSONEditor : function (textarea) {
var self = this;
CodeMirror.fromTextArea(textarea, {
mode: "application/json", lineNumbers: false, lineWrapping: true,
mode: "application/json", lineNumbers: false, lineWrapping: false,
onChange: function() {
self.showSaveCancelButtons();
},
onBlur: function (mirror) {
var key = $(mirror.getWrapperElement()).closest('.row').children('.key').attr('id');
var quotedValue = mirror.getValue();
// TODO: error checking
try {
var JSONValue = JSON.parse(quotedValue);
self.model.set(key, JSONValue, {validate: true});
}
catch (e) {
// TODO: error checking
console.log(e);
}
}
});
},
......
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