tabIndent.js - A JavaScript Library For Tab-Enabled TextAreas
julianlam.github.com
julianlam.github.com
I like the fact that if you select multiple lines with one line partially selected, it works as expected (selecting whole of the partially selected line)
I'm worried about accessibility.
Most of the time tabs are used to navigate between fields, so it'd be cool if this was "opt-in", eg entering the textarea would render an icon to click that enabled this feature. Or at least some way to tell the user that pressing the ESCAPE key is how you should tab-out of the field.
One interesting thing about most implementations of tabs in textareas is that the insertion of a tab typically breaks the browser undo/redo stack for the textarea. This guy implemented it correctly though as mentioned in the bug filed on tabIndent.js: http://www.reddit.com/r/javascript/comments/13tfpf/burned_th...
P.S. Functionn contains a whole lot more of awesome resouces like tabIndent.js. There only a fraction of them I can post here at a time. Take a look if you're interested, and subscribe:
Follow the development on the issue tracker: https://github.com/julianlam/tabIndent.js/issues
Thanks again!
I believe I'll probably end up doing that, unless somebody else does it before I do.