GetSimple Support Forum

Full Version: CKEDITOR.config.tabSpaces
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I want to change the default way the TAB-key is used in the editor, to make it an amount of spaces by hitting the TAB-key:

On this page:


http://docs.cksource.com/ckeditor_api/sy....tabSpaces

Is the following text:

Code:
<static> {Number} CKEDITOR.config.tabSpaces Since: 3.0
Intructs the editor to add a number of spaces (&nbsp;) to the text when hitting the TAB key. If set to zero, the TAB key will be used to move the cursor focus to the next element in the page, out of the editor focus.
Defined in: plugins/tab/plugin.js.
config.tabSpaces = 4;
Default Value:
0

I tried this, but it won't work. Does anyone knows a solution for this?

btw. I'm using GS v. 2.03.1 at the moment.
Well, what I actually wanted to accomplish is to get the TAB-functionallity as seen in for example Word. I find this to be default behavior on a (get)simple editor.
I've also seen it work by default on other editors, like:

Richedit
Wyzz


But I guess nobody knows a solution/cares ?
Try adding this to the CKEditor config file now on the latest beta. Joshas upgraded CKEDitor for us, and what you were trying to use might be for a later version than 2.03.1 has...

Code:
config.tabSpaces = 4;
or rather than editing the core files you can add it to GSCONFIG.php

Code:
define('GSEDITOROPTIONS', "tabSpaces: 4");

Edit :

This works in version 2.03 and above.

Mike...
Thanks. The sugestion of Chris didn't work (maybe I did something wrong?), tested on latest beta.

The solution from Mike did work, but had to change the provided code a bit:

Code:
# WYSIWYG Editor Options
define('GSEDITOROPTIONS', "tabSpaces:4");


b.t.w. shouldn't this be standard behavior of the editor?

edit: tabSpaces:10 seems better.
i'm beginning to think that it should be default behavior too... do we have any other people thinking the same?
Yeah agree , should be the default behavior.
ok, adding it to the SVN now...
ccagle8 Wrote:ok, adding it to the SVN now...

Yay!