How to indicate that all content in the text box has been selected?
Hello everyone.
I want to set two conditions to call different functions:
A “partial selection” as a condition:
(item.constructor.name == "Text")
|| (item.constructor.name == "Word")
|| (item.constructor.name == "Character")
|| (item.constructor.name == "TextColumn")
|| (item.constructor.name == "TextStyleRange")
|| (item.constructor.name == "Paragraph")B. “Select All” as another distinct condition.
“Select All” may also include tables and images.
It seems that whether I select all or just part of the text, the result of `alert(item.constructor.name)` is always “Text”.
Is there a simple code for this? Do I really have to check if both \A and .\Z are selected? That’s too complicated and unnecessary.


