
If you've ever used a textarea/contenteditable, read this. - dhaivatpandya
http://poincare101.herokuapp.com/post/10
======
Turing_Machine
Tab works okay in my latest (see profile) but I didn't use a plugin or
anything like that. I just did:

$iframeEditor.keydown(function(event) { if (event.which == 9) {
event.preventDefault();
iframeDoc.execCommand('insertHTML',true,'&nbsp;&nbsp;&nbsp;&nbsp;'); }});

I agree, not that hard to solve (obviously your mileage may vary as to whether
you might want to insert spaces (as shown), the number of spaces, just ignore
it, do something else, whatever). You might also need to add a little bit of
extra event-handling code to make it work in IE -- I don't know. Fortunately I
only needed to support WebKit for this project. :-)

~~~
Turing_Machine
Apologies for the code formatting -- it looked good when I posted it, I
promise. Heh.

~~~
mooism2
You need to... indent it. 2 spaces I think, maybe 4.

~~~
Turing_Machine
Thanks. I'll try that next time.

------
mooism2
Do most people (non-programmers/sysadmins) use the tab key when writing text?

I'm used to the tab key moving the focus to the next field. It would annoy me
if on one website it didn't, I'm sure.

~~~
dhaivatpandya
I use the tab key when shifting focus, but, for things like editors, you can't
have it jumping around to shift focus.

For things like forms, its fine.

------
Tangaroa
This behaviour comes from Windows and MacOS where the tab key was used to move
between interface elements. The first browsers were built with the same widget
toolkit that the operating systems provided. From the UI perspective of the
these interfaces, the tab key is doing exactly what it is supposed to do and
making it do something else would break user expectations.

It annoys me too, but there is a reason for it.

