Skip to content

Instantly share code, notes, and snippets.

@ebryn
Created June 4, 2011 08:24
Show Gist options
  • Save ebryn/1007720 to your computer and use it in GitHub Desktop.
Save ebryn/1007720 to your computer and use it in GitHub Desktop.
SC.TextArea
SC.TextArea = SC.View.extend({
tagName: 'textarea',
value: null,
placeholder: null,
renderBuffer: function(tagName) {
var buffer = SC.RenderBuffer(tagName);
if (this.get('placeholder')) {
buffer.attr('placeholder', this.get('placeholder'));
}
if (this.get('value')) {
buffer.push(this.get('value'));
}
return buffer;
},
valueDidChange: function() {
this.$().text(this.get('value'));
}.observes('value')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment