Is it possible to use “tabs”(indenting) in textarea using javascript. When tab button is clicked, the next form element is focused. But, i need to indent the text in textarea.
I am currently working in a project and any code with javascript or jquery will help me.
The best plugin I’ve seen for this is the Tabs in Textarea plugin. You can try a demo on its page.
The setup is fairly simple, since it has a simple effect:
The thing that annoyed me most about other plugins was lack of shift+tab, which this handles. You can do this without a plugin, but I wouldn’t in this case…it’s be quite a bit of code yourself, depending on the functionality you’re after. TextRange operations in a cross-browser way are still a bit hairy under the covers, this is one of the times that a plugin is a better approach, IMO.