Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get tab spaces to work in CKEditor?

Is it possible to get CKEditor to recognize tab as a feature inside the editor, especially when in source code mode? Right now, when I hit the tab key, the cursor goes to the next field on the page.

I'd like to get the tab character working so CKEditor can work more like a code editor in which I can format my markup with tab spaces.

I'd really appreciate any help I can get with this.

I'm using CKEDitor 4.0.1

Or, perhaps this feature is supported in one of the newer versions of CKEditor?

like image 253
Pegues Avatar asked Feb 22 '14 02:02

Pegues


Video Answer


1 Answers

This link might help: http://get-simple.info/forums/showthread.php?tid=1347

Basically, just add

config.tabSpaces = 4; // or some other value

to config.js and every time Tab is hit, you get that number of spaces.

like image 144
rvighne Avatar answered Oct 13 '22 14:10

rvighne