text background fabricjs

JavaScript
obj.set('backgroundColor', 'rgb(0,200,0)');
Source

Also in JavaScript: