How to generate list attached to the TextField? - reactjs

I have textfield which contains some text. And I need to generate list attached to the textfield so that when user selected some text and I recieved an answer from backend with info about that specific text the list was generated under that word or at least somewhere nearby the textfield.
The perfect example of what I need would be the dialogflow.
Imgur

Related

how to add react clickable button element as text input along with free text in draftjs?

im aiming for a rich text input text component that enable user to type free text but also can insert tag/button-like element to the text box whenever user select something from select dialog similar to multiple selection interaction. think textarea combined with this.
i have tried to create my own contenteditable element, but its painful, i got issues in selection/caret position etc. so im wondering is it possible to do this in draftjs?

How would you add color to individual words in a React input box component?

I'm currently trying to implement a sort of "highlighting" functionality to a React webpage input box.
The idea is that when the user is typing, each word is sent off to be compared to a list, and then I'd like the input text to change color for each word based on the kind of word it is (object, relation, etc.).
So far I think I've got a grasp on how to change the whole input box text color, but I can't for the life of me figure out how to change the color of each of the words individually.
Does anybody have an idea for how to approach this?

How to implement textinput control and identification

I have a text input box where users can add text, however I would like my program to identify the text in the box and match it up with text in a database.
So the user essentially can't add any text which isn't on the database. So the user will type in the text input box and maybe like a quick selection box appears below it to identify what is being added based on the items on the database.
Not sure where to start implementing this.
Textboxes are just normal textinput components at the moment:
<s:TextInput id="searchInput3" includeIn="AddingInput3" x="126" y="304"change="onChange3(event)"/>
Database is just a local xml file
Looks like you meant auto completion in your text input.
You must search for this in your favorite search engine: "flex text input auto complete" and you should get many results.
One such example for the same is:
http://www.packtpub.com/article/building-a-flex-type-ahead-text-input

Select2 AngularJS - How do i dynamically add a tag item?

I have a select2 input box the defined like this:
<input id="searchbox" ui-select2="autoCompleteSearch" ng-model="searchedLeafs" style="width:80%;height:36px;" class="searchbox"/>
Basically, while the user can type text into the input box (and select from the suggested autocomplete list), i would also would like to enable the user to click on an angular-based button (on the same scope) which "inject" a tag into this input box (instead of the user typing it).
Does anyone can tell me how you can do it property in angularjs? i know how to do it in the old plain select2, but coulnd't find how can you manually/dynamically add items (key/value) to the list of tags.
if you want to get a simple example, lets say that instead of you typing the tags that you want to associate with stackoverflow question, you would simply click on a link/button which would add it to the list of tags yourself.
Thx
Simply push a new object into the ng-model's array and assuming it's duck-typed to the rest of the objects it should show up fine.

Search text from textbox using dialog in Silverlight

I have reachtextbox and want to search text like notepad in silverlight in separate dialog.. Find text and search that text in huge text entered in richtextbox.
How can I do it using separate dialog like notepad and search text and edit and highlight it in richtextbox?
I'd use a Mediator to send messages between search form and text form. You can declare an event like "OnSearch" in your search form and suscribe to it from your text form. When the event raises, you should send an eventarg with the string you want to search.
The text form should suscribe to the "searchMessage" with a string parameter. The Business layer for text form should implement a "search" method that looks for every string/substring depending on your search options. Then change text color for each coincidence.
Searching strings:
http://msdn.microsoft.com/en-us/library/ms228630(v=vs.80).aspx
You can also use the Find method in RichTextBox.
To change the color of that text you have to set the text as selected and then change the color of that selection:
SelectionStart, SelectionLenght, SelectionColor.

Resources