Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

ExtendScript check if selected layer is a text layer or not

Explorer ,
Nov 02, 2021 Nov 02, 2021

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.

TOPICS
Expressions , Scripting
355
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Nov 02, 2021 Nov 02, 2021

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

Translate
Enthusiast ,
Nov 02, 2021 Nov 02, 2021
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines