How to disable the modification of text canvas using Fabric.js ?
In this article, we are going to see how to disable the modification of text canvas using FabricJS. The canvas means text written is movable, rotatable, resizable, and can be stretched. But in this article, we will disable the modification. Further, the text itself cannot be edited like a textbox.
fabric.Text(text, selectable: boolean);
Parameters: This function accepts two parameters as mentioned above and described below:
- text: It specifies the text to be written.
- selectable: It specifies whether to allow modification or not, true by default.
Program: We can use FabricJS to disable the modification of canvas-like text as given below.