In this article, we are going to see how to add underline to the canvas-like text using FabricJS. The canvas means text written is movable, rotatable, resizable, and can be stretched. But in this article, we will add underline to the text. Further, the text itself cannot be edited like a textbox.
fabric.text(text :string, underline: boolean);
Parameters: This function accepts two parameters as mentioned above and described below:
- text: It specifies the text.
- underline: It specifies whether to add underline or not.
Program: This example uses FabricJS add underline to canvas-like text as given below.\
- How to underline a text content using HTML ?
- How to remove underline from a:before using CSS ?
- HTML | DOM Underline Object
- How to remove underline for anchors tag using CSS?
- 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 Set the Gap Between Text and Underlining using CSS ?
- How to replace text with CSS?
- CSS | Text Formatting
- Vue.js | v-text directive
- CSS | Text Effects
- How to check if ul has li with the given text ?
- How to use text as background using CSS ?
- jQuery | :text Selector
- jQuery | text() Method
- CSS text-transform Property
- CSS | text-align-last Property
- CSS | text-justify Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.