mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Add method for setting minimum number of rows in Ace editor widget
Bug: T123891 Change-Id: Ia2e094071f385628449f1935f0250cbeb75196f0
This commit is contained in:
parent
b382eced8c
commit
16330ac05d
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue