25

I'm lookin for a javascript plugin (for js/any framework)

I want to create a textarea that while I type will using a supplied data array, check for predictive matches to the current word im typing and try to suggest a solution.

All solutions I've found so far (for jquery) only match one word, then end...

I want to write like a sentence or paragraph but have autocomplete ability.

Mockup image attached.alt text http://data.getafreelancer.com/project/212922/autocomplete-mockup.jpg

pablo
  • 761
  • 4
  • 8
  • 14
  • 12
    Why closed? Useful question. – Ryan Jun 21 '13 at 15:41
  • @Ryan This is a software recommendation question. Software recommendation questions should be posted on http://softwarerecs.stackexchange.com instead of Stack Overflow. – Anderson Green Feb 11 '15 at 23:41
  • I have built my own at https://ayansome1.github.io/typeahead/ .For the code checkout https://github.com/ayansome1/typeahead – Ayan Nov 23 '17 at 10:19

4 Answers4

16

There is Wick which does support textareas and multiple words.

Prashant Pokhriyal
  • 3,727
  • 4
  • 28
  • 40
Sam
  • 6,240
  • 4
  • 42
  • 53
  • That's goddamn awesome dude, no idea why you got downvoted – David Oct 21 '10 at 00:24
  • I have tried the site, and everytime, I enter some text, and after that text the word that matches, nothing happens. It looks for me that only the first word of the text area is checked for a match, not the word before the cursor. So possible no solution to the problem :-( – mliebelt Feb 27 '11 at 10:04
  • The examples on that site require a comma between email addresses, before it starts matching again. e.g. It won't match another address until you type ',' – ndbroadbent Mar 31 '12 at 08:54
  • Wick is awesome and using it on a phone required arrow keys to be enabled to choose any option other than the first one. If tapping on an option worked, that would be a useful addition but that should be easy to implement. – Sangeet Jun 26 '18 at 13:13
1

Me too: See my answer and implementation.

Prashant Pokhriyal
  • 3,727
  • 4
  • 28
  • 40
mliebelt
  • 15,345
  • 7
  • 55
  • 92
1

I just posted a jquery plugin that does autocomplete in a textarea, I think this is what you are looking for.

Prashant Pokhriyal
  • 3,727
  • 4
  • 28
  • 40
Amir
  • 1,219
  • 3
  • 17
  • 31
0

Since Amir's plugin no longer provided a link to the source code, I extracted it from his examples and created a github project where I've added some enhancements to it. You can find it here:

Prashant Pokhriyal
  • 3,727
  • 4
  • 28
  • 40
LordZardeck
  • 7,953
  • 19
  • 62
  • 119