| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
ve.ui.MWPreTextInputWidget = function VeUiMWPreTextInputWidget( config ) { |
| 17 |
|
| 18 |
ve.ui.MWPreTextInputWidget.super.call( this, config ); |
| 19 |
}; |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
OO.inheritClass( ve.ui.MWPreTextInputWidget, ve.ui.WhitespacePreservingTextInputWidget ); |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
ve.ui.MWPreTextInputWidget.prototype.setValueAndWhitespace = function ( value ) { |
| 31 |
this.whitespace[ 0 ] = value.match( /^\n?/ )[ 0 ]; |
| 32 |
value = value.slice( this.whitespace[ 0 ].length ); |
| 33 |
|
| 34 |
this.whitespace[ 1 ] = value.match( /\n?$/ )[ 0 ]; |
| 35 |
value = value.slice( 0, value.length - this.whitespace[ 1 ].length ); |
| 36 |
|
| 37 |
this.setValue( value ); |
| 38 |
}; |