1 |
2
|
Manuela
|
/**
|
2 |
|
|
* @module ckeditor
|
3 |
|
|
* @version see info.php of this module
|
4 |
|
|
* @authors Michael Tenschert, Dietrich Roland Pehlke, Dietmar Woellbrink
|
5 |
|
|
* @copyright 2010-2012 Michael Tenschert, Dietrich Roland Pehlke, Luisehahne
|
6 |
|
|
* @license GNU General Public License
|
7 |
|
|
* @license terms see info.php of this module
|
8 |
|
|
* @platform see info.php of this module
|
9 |
|
|
* @requirements PHP 5.2.x and higher
|
10 |
|
|
*/
|
11 |
|
|
|
12 |
|
|
################################################
|
13 |
|
|
|
14 |
|
|
--- WebsiteBaker CKEditor module ---
|
15 |
|
|
--- FAQ: How to use customization ---
|
16 |
|
|
|
17 |
|
|
################################################
|
18 |
|
|
################################################
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
# Question: #
|
22 |
|
|
|
23 |
|
|
What files are there to customize CKEditor for WebsiteBaker?
|
24 |
|
|
|
25 |
|
|
# Answer: #
|
26 |
|
|
|
27 |
|
|
All default files in CKEditor modules are in the folder: _yourwbinstallation_/modules/ckeditor/wb_config
|
28 |
|
|
|
29 |
|
|
There are four different files. Please look inside each file with your FTP-Browser / AddonFileEditor / on your local computer:
|
30 |
|
|
|
31 |
|
|
+ wb_ckconfig.js: Here are most of the configuration issues defined.
|
32 |
|
|
Toolbar-Configuration, behavior on Enter / Shift+Enter, default language and so on.
|
33 |
|
|
|
34 |
|
|
+ editor.css: The default look of the WYSIWYG textarea and the preview.
|
35 |
|
|
You can also put an editor.css in any frontend template,
|
36 |
|
|
it will be loaded automatically for each page instead of the default one.
|
37 |
|
|
|
38 |
|
|
+ editor.styles.js: The default styles you can choose from a dropdown in the CKEditor toolbar.
|
39 |
|
|
You can also put an editor.styles.js in any frontend template,
|
40 |
|
|
it will be loaded automatically for each page instead of the default one.
|
41 |
|
|
|
42 |
|
|
+ editor.templates.js: The default CKE templates you can choose of a button in CKEditor toolbar.
|
43 |
|
|
Please note: We recommend not to use CKE templates, because the WebsiteBaker template
|
44 |
|
|
should define the different blocks and the template.
|
45 |
|
|
|
46 |
|
|
Furthermore this files and some other configurations (we recommend you shouldn't change unless you really know what you are doing) are stored in:
|
47 |
|
|
_yourwbinstallation_/modules/ckeditor/include.php
|
48 |
|
|
|
49 |
|
|
|
50 |
|
|
################################################
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
# Question: #
|
54 |
|
|
|
55 |
|
|
Why back to the roots and not different folders anymore?
|
56 |
|
|
|
57 |
|
|
# Answer: #
|
58 |
|
|
|
59 |
|
|
All four configuration files (wb_ckconfig.js, editor.css, editor.styles.js, editor.templates.js) are available in
|
60 |
|
|
_yourwbinstallation_/modules/ckeditor/wb_config
|
61 |
|
|
|
62 |
|
|
The wb_config is loaded and recognized by the CKEditor module unless you copy the folder "wb_config."!
|
63 |
|
|
|
64 |
|
|
As an example you have two possibilities to call the configuration files
|
65 |
|
|
|
66 |
|
|
1) copy the wb_config to the folder _yourwbinstallation_/templates and all changes in config files are for all templates
|
67 |
|
|
2) copy the wb_config to your _yourdefaulttemplate_: _yourwbinstallation_/templates/_yourdefaulttemplate_
|
68 |
|
|
rename folder wb_config to editor, your changes are only for _yourdefaulttemplate_
|
69 |
|
|
|
70 |
|
|
Change the configfiles with your FTP-Browser / AddonFileEditor / ...
|
71 |
|
|
|
72 |
|
|
You should never change the files in _yourwbinstallation_/modules/ckeditor/wb_config, as they are overwritten with any update of CKEditor module and / or WebsiteBaker!
|
73 |
|
|
You never have any problems when upgrading CKEditor module to another version.
|
74 |
|
|
|
75 |
|
|
|
76 |
|
|
################################################
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
# Question: #
|
80 |
|
|
|
81 |
|
|
How is the workflow of reading CKEditor files?
|
82 |
|
|
|
83 |
|
|
# Answer: #
|
84 |
|
|
|
85 |
|
|
Note: The workflow is defined inside _yourwbinstallation_/modules/ckeditor/include.php
|
86 |
|
|
|
87 |
|
|
1) is called as first if available, 2) is the next one, and so on.
|
88 |
|
|
|
89 |
|
|
search order for CKEditor files
|
90 |
|
|
|
91 |
|
|
editor.css
|
92 |
|
|
|
93 |
|
|
1) _yourwbinstallation_/templates/_yourdefaulttemplate_/editor.css
|
94 |
|
|
2) _yourwbinstallation_/templates/_yourdefaulttemplate_/css/editor.css
|
95 |
|
|
3) _yourwbinstallation_/templates/_yourdefaulttemplate_/editor/editor.css
|
96 |
|
|
4) _yourwbinstallation_/templates/wb_config/editor.css
|
97 |
|
|
5) _yourwbinstallation_/modules/ckeditor/wb_config/editor.css
|
98 |
|
|
|
99 |
|
|
wb_ckconfig.js,editor.styles.js,editor.templates.js
|
100 |
|
|
|
101 |
|
|
1) _yourwbinstallation_/templates/_yourdefaulttemplate_/wb_ckconfig.js
|
102 |
|
|
2) _yourwbinstallation_/templates/_yourdefaulttemplate_/js/wb_ckconfig.js
|
103 |
|
|
3) _yourwbinstallation_/templates/_yourdefaulttemplate_/editor/wb_ckconfig.js
|
104 |
|
|
4) _yourwbinstallation_/templates/wb_config/wb_ckconfig.js
|
105 |
|
|
5) _yourwbinstallation_/modules/ckeditor/wb_config/wb_ckconfig.js
|
106 |
|
|
|
107 |
|
|
etc...
|