Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
jos 2015-11-02 20:46:29 +01:00
commit c6ff2d0197
2 changed files with 9 additions and 0 deletions

View File

@ -169,6 +169,13 @@ JSONEditor.prototype.setMode = function (mode) {
}
catch (err) {}
}
if (typeof options.onMode === 'function') {
try {
options.onMode(options.mode);
}
catch (err) {}
}
}
catch (err) {
this._onError(err);

View File

@ -23,6 +23,8 @@ var textmode = {};
* spaces. 2 by default.
* {function} change Callback method
* triggered on change
* {function} onMode Callback method
* triggered after setMode
* {Object} ace A custom instance of
* Ace editor.
* @private