Skip to main content
Abdelkrim Ibrahim
Participating Frequently
November 2, 2021
Answered

ExtendScript check if selected layer is a text layer or not

  • November 2, 2021
  • 1 reply
  • 500 views

Hello;

How to check if selected layer is text layer or not.

For example, I'm used to use the "instanceof" method to check if a selected layer is a shape layer:

selectedLayer instanceof ShapeLayer --> (returns true when it's).

However for the text I can't find an expression to do the same thing. Meanwhile, I searched so many documentations and browsed so many forums and sites.

Thanks in advance.

This topic has been closed for replies.
Correct answer Paul Tuersley

You'd just use instanceof TextLayer in the same way.

1 reply

Paul TuersleyCorrect answer
Inspiring
November 2, 2021

You'd just use instanceof TextLayer in the same way.