Skip navigation
grifter730
Currently Being Moderated

Calling TextAttrs question

Sep 13, 2010 9:05 PM

I'm trying to get certain values of a textbox. For instance, I used dom.getFontMarkup("face") to get the font style. I need to get the value for the text leading. Is it possible?

 

I noticed that TextAttrs has "leading", but I wasn't sure how it could be used.

 

Any help would be appreciated.

 
Replies
  • Currently Being Moderated
    Mar 1, 2011 1:13 AM   in reply to grifter730

    You could try using :

    var text=fw.selection[i].textRuns.textRuns[j].changedAttrs;

    var font = text.face;

    var size = text.size;

    var color = text.fillColor;

    var leadingVal=text.leading;

    where fw.selection[i] is the ith selected object. If it is a text object, it should return "[object Text]".

    Text can have multiple text runs and j is the jth text run.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 15, 2011 1:42 AM   in reply to grifter730

    You'd need to set the var j query correctly I believe.

     

    Regards,

    Jones

    Types Of Kisses

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points