Reputation: 273502
Is there a web (i.e. html) text editor with autocomplete?
Let's say I want to do a web based mini IDE. I want to add it an autocomplete feature, so if you write Str and hit a key combination a javascript method would be invoked that returned possible completions, such as String, StringBuffer, StringBuilder, StreamParser, etc
Upvotes: 1
Views: 1675
Reputation: 36832
You could see at the current position of the cursor move back until the first word boundary and through AJAX search for keywords. You position these keywords in a select
like list just under the cursor.
That would be the very general idea, but it could be too costrly to do on every keystroke, so I'd advice,
Upvotes: 1