In this article, we are going to see how to remove the controls of a text canvas using FabricJS. The canvas means text written is movable and can be stretched according to requirement but we will remove the controls so that it cannot be resized or rotated but only be moved. Further, the text itself cannot be edited like a textbox.
fabric.Text(text, hasControls: boolean);
Parameters: This function accepts two parameters as mentioned above and described below:
- text: It specifies the text to be written.
- hasControls: It specifies whether to enable or disable controls, enabled by default.
Program: This example uses FabricJS to remove controls of a text canvas. Note that you have to click on the text to see if its controls are there or not.