これは私のコードです
$("#textbackground").click(function() {
var obj = canvas.getActiveObject();
![enter image description here][1]
//alert("weight");
if (!obj) return;
obj.setTextBackgroundColor('rgb(0,200,0)');
canvas.renderAll();
});
このリンクのように、背景色をテキストのみに設定する必要がありますが、テキストのみではなく、背景色を正方形のテキストに設定しています ここにリンクの説明を入力してください
では、どのように設定しますか
obj.setTextBackgroundColor('rgb(0,200,0)');