This function is specified in the commands handler below, but did not
have an implementation for the plain textarea case.
Better we make this work. A user wanted this api call so his JS
cleanup script could work consistently on both plain textarea and the
CodeEditor
Change-Id: Ib3afc505037a5b12269e55b4b130a38a3fac7823
getContents: function () {
return this.val();
},
+ /**
+ * Set the contents of the textarea, replacing anything that was there before
+ */
+ setContents: function ( content ) {
+ this.val( content );
+ },
/**
* Get the currently selected text in this textarea. Will focus the textarea
* in some browsers (IE/Opera)
$( '#qunit-fixture' ).append( $textarea );
- // This method is actually missing atm...
- //$textarea.textSelection( 'setContents', opt.before.text);
-
- // Won't work with the WikiEditor iframe?
- $textarea.val( opt.before.text );
+ $textarea.textSelection( 'setContents', opt.before.text );
start = opt.before.start;
end = opt.before.end;