+ 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

14th Jun 2018, 4:16 PM
Akashdeep Nandi
Akashdeep Nandi - avatar
4 Answers
15th Jun 2018, 12:59 AM
CalviŐ˛
CalviŐ˛ - avatar
0
Sorry description has a typo
15th Jun 2018, 4:41 AM
Akashdeep Nandi
Akashdeep Nandi - avatar
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
15th Jun 2018, 4:42 AM
Akashdeep Nandi
Akashdeep Nandi - avatar
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).
20th Aug 2018, 8:53 PM
Katie (Ctrl-Alt-Cuteness)
Katie (Ctrl-Alt-Cuteness) - avatar