User Tools

Site Tools


how_to:editor_configuration_custom_files

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
how_to:editor_configuration_custom_files [2011/05/14 14:02]
Connie [Standard Configuration File]
how_to:editor_configuration_custom_files [2013/05/21 10:15]
yojoe [HTML or XHTML output ?]
Line 1: Line 1:
-**GetSimple-CKEditor** comes with a default configuration file and with a default stylesheet-file (for the styles-combobox).+ \\ 
 +======CKEditor ​Configuration Files======
  
-You can define your own configuration files which will not be overwritten by GetSimple-Upgrades and which offer some features which are not needed in a standard, stripped-down version.+**GetSimple-CKEditor** comes with a default configuration file and with a default stylesheet-file (for the styles-combobox). ​You can define your own configuration files which will not be overwritten by **GetSimple**-Upgrades and which offer some features which are not needed in a standard, stripped-down version.
  
 ===== Standard Configuration File ===== ===== Standard Configuration File =====
Line 41: Line 42:
 <​code>​define('​GSEDITOROPTIONS',​ "​entities : false,​customConfig : '​../​../​../​../​data/​editorconfig/​yourconfigfile.js',​skin:​ '​v2'​ <​code>​define('​GSEDITOROPTIONS',​ "​entities : false,​customConfig : '​../​../​../​../​data/​editorconfig/​yourconfigfile.js',​skin:​ '​v2'​
 "​);</​code>​ "​);</​code>​
-For this you must create the folder ''​editorconfig''​ in your ''​data-directory''​ and upload the file to that folder.+For this you must create the folder ''​editorconfig''​ in your ''​data-directory''​ and upload the file to that folder. And allow check the .htaccess that js-files are allowed in the data-directory.
 === Example file: === === Example file: ===
 <​code>/​* <​code>/​*
Line 145: Line 146:
   * you need the advanced editor-toolbar to use the styles-combo-box. If you have not done yet, activate that toolbar.\\ <​code>​define('​GSEDITORTOOL',​ '​advanced'​);</​code>​   * you need the advanced editor-toolbar to use the styles-combo-box. If you have not done yet, activate that toolbar.\\ <​code>​define('​GSEDITORTOOL',​ '​advanced'​);</​code>​
   * add the stylesheet-definition to the Editor-Options:​\\ ​   * add the stylesheet-definition to the Editor-Options:​\\ ​
-<​code>​define('​GSEDITOROPTIONS',"​stylesSet:​ '​default:​http://​www.testdomain.de/.../theme/yourname.js"​);</​code>​+<​code>​define('​GSEDITOROPTIONS',"​stylesSet:​ '​default:​http://​www.yourdomain.de/getsimple-root/themes/ckeditorstyles.js'"​);</​code>​
    
 Now, what to edit in this file? Now, what to edit in this file?
Line 185: Line 186:
  
 <​code>​{ name : 'Red table',​ element : '​table',​ styles : { '​background-color':'​red'​ } },</​code>​ <​code>​{ name : 'Red table',​ element : '​table',​ styles : { '​background-color':'​red'​ } },</​code>​
 + \\
 +===== HTML or XHTML output ? =====
 +CKEditor by default wraps the content using XHTML tags (every tag has to be enclosed), and in such way formats it. \\
 +To get rid of / in closing tags (to achieve for example [b]''​ <br> ''​[/​b] [HTML] instead of [b]''​ <br /> ''​[/​b] [XHTML]) upon saving page , \\
 +you need to edit CKE's ''​ config.js ''​ file located in ''​ admin/​template/​js/​ckeditor/​ ''​ , and add below code:
 +
 +<​code>​
 +CKEDITOR.on( '​instanceReady',​ function( ev )
 +    {
 +        ev.editor.dataProcessor.writer.selfClosingEnd = '>';​
 +    });
 +</​code>​
how_to/editor_configuration_custom_files.txt · Last modified: 2013/05/21 10:16 by yojoe