Posts: 1,247
Threads: 82
Joined: Feb 2011
2011-03-01, 02:24:19
(This post was last modified: 2011-03-04, 21:57:57 by netmaster.)
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 ( ) 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.
Posts: 1,247
Threads: 82
Joined: Feb 2011
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 ?
Posts: 1,848
Threads: 86
Joined: Aug 2009
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;
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 1,108
Threads: 70
Joined: Aug 2009
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...
Posts: 1,247
Threads: 82
Joined: Feb 2011
2011-03-14, 21:04:52
(This post was last modified: 2011-03-14, 21:15:26 by netmaster.)
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.
Posts: 1,848
Threads: 86
Joined: Aug 2009
i'm beginning to think that it should be default behavior too... do we have any other people thinking the same?
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 1,108
Threads: 70
Joined: Aug 2009
Yeah agree , should be the default behavior.
Posts: 1,848
Threads: 86
Joined: Aug 2009
ok, adding it to the SVN now...
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 1,247
Threads: 82
Joined: Feb 2011
ccagle8 Wrote:ok, adding it to the SVN now...
Yay!