What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 130 Stack Exchange communities.

In the Stack Overflow text editor we are not able to add tab characters -- pressing Tab will instead switch to the next text field (for entering tags). I checked the CKeditor demo, and it does the same thing. Is it possible for the editor to provide the option to add tab characters within the editor?

share|improve this question

migrated from stackoverflow.com Oct 3 '11 at 22:07

This question came from our site for professional and enthusiast programmers.

    
for eg:- i will post a db table structure as a question . for aligning it properly the column in "word" i can TAB. but in SO editor i cant . Why –  zod Oct 3 '11 at 21:35
    
soon it will be moved to meta –  zod Oct 3 '11 at 21:38
    
Another example of why Block migration if user is suspended/question-blocked at destination should be implemented. –  Dori Oct 8 '11 at 7:35

1 Answer 1

It is probably designed that way. But it does support tabs in a way.

A standard textarea usually doesn't accept tabs without modifications (ex: Javascript: http://ajaxian.com/archives/handling-tabs-in-textareas). The SO site doesn't implement that feature.

But you can copy and paste tabs like here: tab tab tab But they won't show as HTML treats tabs as whitespaces so basically they will appear as spaces.

But here    tab tab taaab   tab will show.

Because code is put in pre (preformated) tags that will display tabulations and will use a fixed width font.

So if you want to display preformated text add 4 spaces at the beginning of each line and there you will have access to tabulations.

share|improve this answer
    
But tab will only be four spaces wide (at least that is what I'm seeing) so you probably want to use two of them. –  agf Oct 3 '11 at 22:12
2  
Yeah... My example didn't work with the word tab followed by an actual tab. But I think the OP is answered none the less an will be happy to tab as much as he likes now... That might have frightening consequences. –  Coyote Oct 3 '11 at 22:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .