Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Text and IText in fabricJS

Can someone please tell me what makes fabric.IText different from fabric.Text? Any demo I can look at? Official Fabric tutorial only describes Text and I see no difference with usage in official IText demo.

like image 836
zigotica Avatar asked Sep 03 '14 22:09

zigotica


1 Answers

In Text: You can set any style (like fill,textBackgroundColor,fontSize...etc) , it will be applied to "whole text".

But in IText: You can set styles to "any number of characters(you selected)" from your text and it will be applied to the selected part of text only.

For selecting characters from Itext you can use :

  • Create selection: click/touch & drag, Select word: double click and Select line: triple click

    or, follow IText docs

    and try again IText Examples

like image 156
Raj Avatar answered Oct 15 '22 18:10

Raj