Add a global function to add the textcomplete to a given element

This will allow plugins to use the autofill functionality.