-
Notifications
You must be signed in to change notification settings - Fork 65
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
Feature request: Set style on range #87
Comments
This feature is a must-have for my application (I need at least two additional highlight ranges beyond what base TextArea offers) so I am trying to prototype it… I'm doing this via an I am getting tripped up because I do not quite understand what the
This makes sense, what I don't get is:
I haven't yet found where/how this case is handled. I will look at it closer tomorrow but any guidance appreciated! |
Actually, maybe I don't need to understand how it works. I just added my boundaries to LineHighlighter and it seems to work. I will likely drop a first-pass PR soon. I am still curious what happens if I set "overlapping" ranges (as in my sphinx example above) however. |
Hello, I am interested in using tui-textarea. However I have a need. For my application, it must be possible to apply a style to a range of text. For example, maybe I am implementing syntax highlighting in a programming language. Or maybe I am implementing a spell checker and I want misspelled words to be highlighted. Or maybe I want the word under the cursor to always highlight.
Is this possible? Reading the docs, tui-textarea currently there is styling for specific special items known to tui-textarea, such as the search highlight or the cursor or the selection. But it seems like I cannot just say "highlight characters 4 through 7 on line 5". (Ideally, my custom "range" highlight should combine with the existing style types intelligently— for example if I set characters 4-7 as red, and the cursor character as an underline, and I move the cursor to position 5, that character should be red and underlined).
There is already a feature request for syntax highlighting. But I think this is a different request, simpler and more basic. Syntax highlighting controlled by tui-textarea would not allow me to style special ranges of text with meaning known only to my application.
The text was updated successfully, but these errors were encountered: