...

View Full Version : Multi-word, multi-line autocomplete for the web. Is it possible?



tagnu
08-12-2010, 11:05 AM
Hi all,

I'm working on a small online code editor.
http://tagnu.freehostia.com/test/input/jquery/

Now, I'm focusing on the 'Autocomplete' feature, which works fine as long as I write a single line of code :). (using jQuery autocomplete plugin (http://docs.jquery.com/Plugins/Autocomplete#Example))

It becomes a mess, the moment I go multi-line :eek:.

I it possible to create a multi-line, multi-word autocomplete field? Something like the autocomplete feature in Notepadd++ ? (screenshot attached)

Any ideas?

Thank you.

tagnu
08-14-2010, 10:53 AM
Apologies! if that was a confusing one. Sorry for not being very clear.

My first question: Multi-line autocomplete.
The textarea has autocomplete functionality.

If I try to write the following code on the textarea, it works fine for the first line. But, when I press the enter key (for newline) and start typing subsequent code, the auto complete works but the new line gets stripped off!

Please have a try. (link to script (http://tagnu.freehostia.com/test/input/jquery))


#include <stdio.h>
void main() {
int i;
}

Please don't hesitate to ask any questions if the description is still confusing :)
Any pointers appreciated.

Thank you



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum