Neatly resize the ace editor when validation errors are added/removed
This commit is contained in:
parent
0690202f3a
commit
be40705cde
|
@ -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
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
};
|
||||
|
||||
var options = {
|
||||
mode: 'tree',
|
||||
mode: 'code',
|
||||
modes: ['code', 'form', 'text', 'tree', 'view'], // allowed modes
|
||||
onError: function (err) {
|
||||
console.error(err);
|
||||
|
|
Loading…
Reference in New Issue