The new TextboxList is here

It’s been some time since TextboxList got some attention. It is undoubtedly one of my most popular JavaScript projects, along with the famous Fancy Menu (MorphList) and its slideshow sibling, BarackSlideshow.

TextboxList (demo) has been rewritten from scratch, and it’s more solid than ever. The first time around, elegance was not one of the goals. I focused on releasing the first open source script that reproduced the Facebook’s tokenizer.

Let’s see the new changes:

TextboxList

  • Compatible with MooTools 1.2.x
  • New options, such as addOnEnter, which adds boxes upon pressing enter (useful for tags or categories widgets).
  • More events, which gives the developer more power to extend it.
  • Each element is now identified by an id, a plain value and a HTML value.
  • Use of control, alt, meta keys no longer interfere with the elements keyboard navigation.
  • Bugs with text selection fixed.
  • Improved API, even more extensible.
  • Plugins support

Textboxlist.Autocomplete

This is the most important official plugin. It also has been rewritten, and packs new features:

  • Flexible. It does not depend on a specific data source (XHR, Json). Instead, the developer supplies the data which can come from anywhere.
  • Binary search for maximum performance
  • Simpler CSS with comments for non-experienced developers.

Without further ado, head to the project page to check out the demos and downloads.

Displaying only a subset of the comments. Click here to display all comments.

  1. Nice work, purchasing a commercial license.

    • Olivier Refalo about 1 year ago

      Question: Can the widget dynamically request JSON suggestions ?
      I see in your example that you are pre-reading a list of suggestions. This is great but it only works when the list is small.

      What if the list of entries is Huge ? -> there is actually another project which does this right, autocompleter.

      I was wondering if textboxlist had the same hooks in the api…

    • Guillermo Rauch about 1 year ago

      Out of the box it doesn’t. The main reason for this is that it’s meant to work ala Facebook or Gmail, with preloading.

      However, I had this other use in mind, and I designed it in such a way that the user could extend it to work like this.

    • Olivier Refalo about 1 year ago

      hum, could you provide guidance as to how to implement it ? High level guidance, what class/methods to overload and what to do.

      Sorry I am not an expert, plus guidance usually helps getting up to speed.

      Thank you,