Skip to main content
Participant
April 16, 2021
Answered

Invisible (hidden) text in small textArea

  • April 16, 2021
  • 1 reply
  • 857 views

I have some small text area and some text in it. When  textRange.size = 5  (for example) i see this text, but when its bigger (6 pt for example) it hides away. So, I have 2 questions:
1. is there a varaible (or may be a fast way to calculate) that tells me will this text hidden or not ? 
2. is there an option (or script variable) to show text lager then my textArea anyway? 


This topic has been closed for replies.
Correct answer femkeblanco

I presume you mean overset text, i.e. more than fits into an area.

 

For a (selected) single line, you can test for it with

 

alert( selection[0].lines[0].characters.length < selection[0].characters.length );

 

For ruther details, see Vasily Hall's script.

 

1 reply

femkeblanco
femkeblancoCorrect answer
Legend
April 17, 2021

I presume you mean overset text, i.e. more than fits into an area.

 

For a (selected) single line, you can test for it with

 

alert( selection[0].lines[0].characters.length < selection[0].characters.length );

 

For ruther details, see Vasily Hall's script.

 

1amobotAuthor
Participant
April 17, 2021

Yes, i have already found it, thank you! I have several rows in text area, and when textArea.textRange.lines.length != rowsCount, it means that some line is hidden.