+ 1
I'm building as real time editor so how can I make tab work ad tab only not using it for sequential focus in html?
I mean when I am in a input type text or textarea and I press tab it should not go to next element, it should simply add a tab i.e. multiple spaces. Help me out
4 Antworten
0
Sorry description has a typo
0
I mean when I press tab in a textarea it jumps to next element right? But I don't want that. I want to just have a tab input into the textarea that is multiple spaces
0
// modern style
TEXT_ENTRY_ELEMENT.addEventListener('keydown', FUNCTION_HERE);
// old style
TEXT_ENTRY_ELEMENT.onkeydown = FUNCTION_HERE;
The old style varies for what is sent to its function (blame Microsoft for its IE issues), but the modern style is always sent the same (as long as you can use it).