1.插件 textbox的舉例使用
var iTextSample = new fabric.Textbox('快來康康', { left: 150, top: 100, fontFamily: 'Helvetica', fill: 'yellow', //設置字體顏色 width: 600, borderColor: 'orange', borderScaleFactor: 2, //border的寬度 strokeWidth: 2, //字體描邊的寬度 stroke: "rgb(0,0,0)", //hasBorder:true, //默認就是true lineHeight: 1.1, fontSize: 40, editingBorderColor: "pink", fontWeight: "bolder", textAlign: 'center' }); canvas.add(iTextSample);
2.與之相關的插件還有 text itext