Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] CKEditor custom config - gsconfig.php definition does not work
#5
(2014-03-08, 00:31:37)shawn_a Wrote: customConfig : '../../../../theme/cke_custom.js'
works for me

what version are you using?

Thank you Shawn, your certainty made me dig it deeper just to find it out!
I'm using the latest 3.3.1 GS version with patched CKEditor 4.3.2.

Solution and problems you may confront

This is the path to my template where is config.js and styles.js stored.
Code:
http://tomasjanecek.cz/theme/TJv2/ckeditor/
Obviously, config.js contains my custom settings of CKEditor and style.js contains classes which can be added via CKEditor.

1st important thing
- you can't set both the styles and config separately with those two lines I posted. As you can see, both (define('GSEDITOROPTIONS',"stylesSet: ...
AND define('GSEDITOROPTIONS', "entities : false,customConfig : ...) start with "GSEDITOROPTIONS. Therefore, only the thing you define first will take effect. If you want to set both custom styles and custom config, you have to join both settings into one GSEDITOROPTIONS definitions (see below).

2nd important thing
- you can use relative URLs for both styles and config.

3rd important thing
- when defining custom config file, you have to change the part with editor skin at the end to some that exists in your /CKEditor/skins folder:
Code:
,skin: 'v2'");
for
,skin: 'getsimple'"); OR ,skin: 'kama'"); OR ,skin: 'moono'"); OR ,skin: 'moonocolor'");
These I named there are the ones that are present in current GS with patched CKEditor to 4.3.2.

At the end, you end up with the following code or similar:
Code:
define('GSEDITOROPTIONS', "stylesSet: 'default:../../../../theme/TJv2/ckeditor/styles.js', entities : false,customConfig : '../../../../theme/TJv2/ckeditor/config.js', skin: 'getsimple'");
Works like a charm Smile


So after the hours digging into it, I would like to ask someone who takes care of the wiki to update the information there.


Furthermore, I would like to ask Shawn to change the default settings of CKEditor in the "link" popup, tab advanced. On one hand, there are some useless settings like access key, name or tab index. On the other hand, there is title="" attribute missing.
I suggest to remove those useless attributes by adding these lines to line +-60
Code:
advTab.remove( 'advTabIndex');
advTab.remove( 'advAccessKey');
advTab.remove( 'advName' );
and to add title attribute setting by removing line 59 in config.js
Code:
advTab.remove( 'advTitle' );


Thank you for making me dig into it to find the solution and please, consider the two paragraphs above this line.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply


Messages In This Thread
RE: CKEditor custom config - gsconfig.php definition does not work - by TeeJay - 2014-03-08, 04:22:26



Users browsing this thread: 2 Guest(s)