title: Detect Once a Certain Word Has Just Been Entered in a Textarea
body: <p>Considering features like EditArea's and CodeMirror's autocomplete, I was wondering if, like Dreamweaver, there is a way to detect if the last word you entered is in a certain list then provide the same kind of suggestion box but with the function's arguments.  I imagine you would use a regular expression on the entire field or possibly split() the whole thing (or the current line) then use the length attribute of the array to find the last bit of text, then do something involving an indexOf-like operation; however, this seems like it would get a bit resource-intensive.  It almost looks like I've answered my own question, but it always helps to fully explain one's quandary, especially publicly.  There's gotta be a better solution than mine.  I appreciate any input.  Thank you.</p>