Javascript Articles

Page 211 of 534

How to change string to be displayed as a superscript using JavaScript?

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 3K+ Views

In this tutorial, we will learn how to display strings as superscript using JavaScript and HTML. Superscript text appears raised above the normal text baseline, making it smaller and positioned at half-height. This is commonly used in mathematical formulas like A2, B3, or scientific notations like 105. Superscript is essential for writing mathematical expressions, chemical formulas (like H2O+), and footnote references in web content. Using HTML Tag The simplest way to create superscript text is using the HTML tag. Any text inside this tag will automatically display as superscript. Syntax 102 = ...

Read More

How to lock the flipping during scaling of Textbox using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 280 Views

In this tutorial, we are going to learn how to lock the flipping during scaling of a Textbox using FabricJS. Just as we can specify the position, colour, opacity and dimension of a textbox object in the canvas, we can also specify whether we want to stop flipping an object during scaling. This can be done by using the lockScalingFlip property. Syntax new fabric.Textbox(text: String, { lockScalingFlip : Boolean }: Object) Parameters text − This parameter accepts a String which is the text string that we want to display ...

Read More

How to lock the horizontal movement of Textbox using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 194 Views

In this tutorial, we are going to learn how to lock the horizontal movement of a Textbox using FabricJS. Just as we can specify the position, colour, opacity and dimension of a textbox object in the canvas, we can also specify whether we want it to move only in the Y-axis. This can be done by using the lockMovementX property. Syntax new fabric.Textbox(text: String, { lockMovementX: Boolean }: Object) Parameters text − This parameter accepts a String which is the text string that we want to display inside our ...

Read More

How to lock the horizontal scaling of Textbox using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 464 Views

In this tutorial, we are going to learn how to lock the horizontal scaling of a Textbox using FabricJS. Just as we can specify the position, colour, opacity and dimension of a textbox object in the canvas, we can also specify whether we want to stop scaling an object horizontally. This can be done by using the lockScalingX property. Syntax new fabric.Textbox(text: String, { lockScalingX : Boolean }: Object) Parameters text − This parameter accepts a String which is the text string that we want to display inside our ...

Read More

How to lock the horizontal skewing of Textbox using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 261 Views

In this tutorial, we are going to learn how to lock the horizontal skewing of a Textbox using FabricJS. Just as we can specify the position, colour, opacity and dimension of a textbox object in the canvas, we can also specify whether we want to stop skewing an object horizontally. This can be done by using the lockSkewingX property. Syntax new fabric.Textbox(text: String, { lockSkewingX : Boolean }: Object) Parameters text − This parameter accepts a String which is the text string that we want to display inside our ...

Read More

How to lock the rotation of Textbox using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 297 Views

In this tutorial, we are going to learn how to lock the rotation of a Textbox using FabricJS. Just as we can specify the position, colour, opacity and dimension of a textbox object in the canvas, we can also specify whether we want to allow rotation or not. This can be done by using the lockRotation property. Syntax new fabric.Textbox(text: String, { lockRotation : Boolean }: Object) Parameters text − This parameter accepts a String which is the text string that we want to display inside our textbox. ...

Read More

How to lock the vertical movement of Textbox using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 288 Views

In this tutorial, we are going to learn how to lock the vertical movement of a Textbox using FabricJS. Just as we can specify the position, colour, opacity and dimension of a textbox object in the canvas, we can also specify whether we want it to move only in the X-axis. This can be done by using the lockMovementY property. Syntax new fabric.Textbox(text: String, { lockMovementY: Boolean }: Object) Parameters text − This parameter accepts a String which is the ...

Read More

How to lock the vertical scaling of Textbox using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 279 Views

In this tutorial, we are going to learn how to lock the vertical scaling of a Textbox using FabricJS. Just as we can specify the position, colour, opacity and dimension of a textbox object in the canvas, we can also specify whether we want to stop scaling an object vertically. This can be done by using the lockScalingY property. Syntax new fabric.Textbox(text: String, { lockScalingY : Boolean }: Object) Parameters text − This parameter accepts a String which is the text string that we want to display inside our ...

Read More

How to make a Textbox invisible using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 433 Views

In this tutorial, we are going to learn how to make a Textbox invisible using FabricJS. Textbox is one of the various shapes provided by FabricJS. We can customize, stretch or move around the text written in a textbox. In order to create a textbox, we will have to create an instance of fabric.Textbox class and add it to the canvas. Our textbox object can be customized in various ways like changing its dimensions, adding a background color or by making it visible or invisible. We can do this by using the visible property. Syntax new fabric.Textbox(text: ...

Read More

How to make the controlling corners of a Textbox transparent using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 271 Views

In this tutorial, we are going to learn how to make the controlling corners of a Textbox transparent using FabricJS. We can customize, stretch or move around the text written in a textbox. In order to create a textbox, we will have to create an instance of fabric.Textbox class and add it to the canvas. The transparentCorners property allows us to make the controlling corners of Textbox transparent. Syntax new fabric.Textbox(text: String, { transparentCorners: Boolean }: Object) Parameters text − This parameter accepts a String which is the text ...

Read More
Showing 2101–2110 of 5,340 articles
« Prev 1 209 210 211 212 213 534 Next »
Advertisements