Neatly resize the ace editor when validation errors are added/removed

This commit is contained in:
jos 2016-01-12 15:41:22 +01:00
parent 0690202f3a
commit be40705cde
2 changed files with 7 additions and 1 deletions

View File

@ -442,6 +442,12 @@ textmode.validate = function () {
this.content.style.marginBottom = (-height) + 'px';
this.content.style.paddingBottom = height + 'px';
}
// update the height of the ace editor
if (this.aceEditor) {
var force = false;
this.aceEditor.resize(force);
}
};
// define modes

View File

@ -64,7 +64,7 @@
};
var options = {
mode: 'tree',
mode: 'code',
modes: ['code', 'form', 'text', 'tree', 'view'], // allowed modes
onError: function (err) {
console.error(err);