Skip navigation
Currently Being Moderated

Get paragraph style details of text layer.

Oct 31, 2013 5:07 AM

Tags: #photoshop #scripting #cs6

Hi All,

 

I am developing an extension for Photoshop CS6 onwards. I want to get the paragraph style and its properties of my text layer. If I apply a new style and try to get the properties, I always get the Basic Paragraph properties and not the properties of the applied style. I am unable to understand this behaviour. Here is the code I am using,

 

var curLayer = app.activeDocument.activeLayer;

var activeTextItem = curLayer.textItem;

if(activeTextItem.contents != "")

{

    alert(activeTextItem.font);

}

 

I always get the font details of the Basic Paragraph style.

 

Am I missing something?

 

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