-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
controlling text area height dynamically based on content. #77
Comments
Hi Maher, |
Hi Tomas, Is there a way I can determine the preferred height (which you use to Thanks On Aug 20, 2014 5:50 AM, "TomasMikula" notifications@github.com wrote:
|
Hi Maher, I see what you are trying to do. Unfortunately, there is no API to get the full height of the text. In fact, the real height of the text is not even known exactly. This sounds strange, but it is for performance reasons. Paragraphs that don't fit into the viewport are not rendered at all, thus their height is not computed. Scrollbars are currently updated based on an estimate that is computed based on the height of the visible paragraphs. This saves a lot of time and memory for large files. What you are trying to do would give up all these savings. However, not even the estimate is accessible through the API. |
Thanks for the update, Tomas. It makes sense. On 20/08/2014 3:37 PM, TomasMikula wrote:
|
This might be possible if one could determine the bounds of the visible paragraphs and adjust the area's size (up to a maximum/minimum size) whenever the visible paragraphs change. |
Closed via PR 944 |
Hi Tomas, I was wondering if it is possible to control the hieght of the text area dynamically by its content( number of lines and sizes if characters) as well as the width of the area. In a sense, I don't want a vertical scroll bar, but rather I want the text area height to grow based on the text itself and the width of the text area.
Is there a way to do this?
Thanks
Maher
The text was updated successfully, but these errors were encountered: