Closed
Description
Describe the problem this feature would solve
Currently, TokenizingTextBox
only accepts tokens. It can be expanded to support raw text as well. With this addition, TokenizingTextBox
can be used as chat box or comment box where mention feature is available.
Describe solution
The control will accept raw text like a regular TextBox
. When a specified token opening signifier is matched (e.g. @
for mention), it will start suggesting token. Once the control starts suggesting, it only stops when:
- User selects a suggested token.
- No matching token is found. Adding more text won't produce a match. Current query is considered raw text.
- Another opening signifier is detected. Previous query is considered raw text. Start suggesting for the current query.
The control should also provide suggestions when the user go back and edit raw text. When editing, only the string between the signifier and the caret, not including whitespace, is queried.
For example, with |
as caret position, Hello Miles Luna how are you?
when change to:
Hello @|Miles Luna how are you?
it will start suggesting from empty query.Hello @Miles| Luna how are you?
onlyMiles
should be queried for suggestions. Token selection will replaceMiles
.Hello @Miles L|una how are you?
no suggestion as there is whitespace betweenMiles
andL
Feature | Priority |
---|---|
Get and set raw text | Must |
Change token opening signifier | Must |
Parse raw text to populate tokens | Should |
Support multiple signifiers at the same time (e.g. @ for mention, # for tag) |
Should |
Support editing token's raw text representation (e.g. @Miles Luna can be shortened to @Miles while still being the same token) |
Should |
Describe alternatives you've considered
- AutoSuggestBox