diff --git a/lib/ace/config.js b/lib/ace/config.js index bdd6a162..05d5f015 100644 --- a/lib/ace/config.js +++ b/lib/ace/config.js @@ -258,4 +258,17 @@ exports.resetOptions = function(obj) { }); }; +exports.setDefaultValue = function(path, name, value) { + var opts = defaultOptions[path] || (defaultOptions[path] = {}); + if (typeof name == "string") { + if (opts[name]) + opts[name].value = value; + } else { + Object.keys(name).forEach(function(key) { + if (opts[key]) + opts[key].value = name[key]; + }); + } +}; + });