In this article, we are going to see how to add linethrough to a canvas-like text using FabricJS. The canvas means text written is movable and can be stretched, resized and rotated according to requirements. Further, the text itself cannot be edited like a textbox.
fabric.Text(text, linethrough: boolean);
Parameters: This function accepts two parameters as mentioned above and described below:
- text: It specifies the text to be written.
- linethrough: It specifies whether to enable or disable the linethrough text decoration, disabled by default.
Program: We can use FabricJS to add linethrough to a canvas-like text as given below.
- Text Animation with changing the color of the text using HTML & CSS
- How to create long shadow of text without using text-shadow in HTML and CSS ?
- How to add overline to a text canvas using Fabric.js ?
- How to add default vertical scaling to a text canvas using Fabric.js ?
- How to add stroke width of text canvas using Fabric.js ?
- How to add underline to canvas-type text using Fabric.js ?
- How to add vertical skew to a canvas-type text using Fabric.js ?
- How to Add Image in Text Background using HTML and CSS ?
- How to add shadow to text using CSS ?
- How to remove borders of a canvas-type text using Fabric.js ?
- Double Layered Text Effect using CSS
- How to override the current text direction using HTML ?
- How to disable text selection highlighting using CSS?
- How to display HTML tags as plain text using PHP
- How to give text or an image transparent background using CSS?
- Set the limit of text length to N lines using CSS
- Image Replacement in Bootstrap using text-hide Class
- How to prevent text in a table cell from wrapping using CSS?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.