I’m trying to implement a custom hint function where I pass my own list of keywords etc. to be shown in autocomplete window. However I also have some keywords(eg. “First Name”) with white spaces between them and I want them to appear in this dropdown. This seems to work at start :
However, when I type after white space there’s no match :
This is probably because of the way hinting picks the token at current cursor(doesn’t include white spaces). Are there any APIs available to by-pass this behavior and include white space phrases in autocomplete list. Any related examples that might help are also appreciated.
I’m not aware of an example, but the hint source is free to select a region bigger than a single word to complete (it has direct access to the editor, doesn’t need to look at just a single token). You might also have to change the closeCharacters setting to the show-hint addon to allow typing spaces without closing the widget.