Add method for setting minimum number of rows in Ace editor widget

Bug: T123891
Change-Id: Ia2e094071f385628449f1935f0250cbeb75196f0
This commit is contained in:
Thalia 2015-12-20 12:40:08 +00:00
parent b382eced8c
commit 16330ac05d

View file

@ -158,6 +158,22 @@ ve.ui.MWAceEditorWidget.prototype.setEditorValue = function ( value ) {
}
};
/**
* Set the minimum number of rows in the Ace editor widget
*
* @param {number} minRows The minimum number of rows
*/
ve.ui.MWAceEditorWidget.prototype.setMinRows = function ( minRows ) {
var widget = this;
this.loadingPromise.done( function () {
widget.editor.setOptions( {
minLines: minRows
} );
} );
// TODO: Implement minRows setter for OO.ui.TextInputWidget
// and call it here in loadingPromise.fail
};
/**
* @inheritdoc
*/