Révision 6fd71452
Ajouté par Julien Enselme il y a environ 10 ans
drupal7/sites/all/modules/ckeditor/CHANGELOG.txt | ||
---|---|---|
1 |
7.x-1.x dev |
|
2 |
|
|
3 |
[#2255129] by wwalc: Introduced support for the codesnippet and mathjax plugins. |
|
4 |
[#1762328] by wwalc: IMPORTANT: <code> tags are no longer protected by default. |
|
5 |
[#1327898] by grasmash: Adding new ckeditor_security_filter_alter() hook. |
|
6 |
[#2175565] by hswong3i: Download Library with ckeditor.make for Simple Profile Integration. |
|
7 |
[#2249139] by wwalc: Use CKEditor 4.4.0 from CKEditor CDN (http://cdn.ckeditor.com) by default. |
|
8 |
[#1370894] by uberhacker, mgifford, Devin Carlson: Conditionally load ckeditor.css only when necessary. |
|
9 |
[#1960808] by valkum, wwalc: Avoid using arg() in code. |
|
10 |
[#1914496] by Danylo Dragan: Drush integration code doesn't respect --skip option. |
|
11 |
[#2085245] by jlyon: Fix theme path displayed on Edit CKEditor Profile page. |
|
12 |
[#2123669] by wwalc: Better support for loading custom CKEditor skins. |
|
13 |
[#1914904] by rooby: Media plugin not working in IE 9 and below. |
|
14 |
[#2244835] by loopduplicate: CKEditor is not visible in Panels IPE in IE11. |
|
15 |
[#2244817] by wwalc: CKEditor from CDN does not load in Panels IPE when a form is loaded in a popup for the first time. |
|
16 |
[#2244387] by wwalc: 3rd party plugins with large icons break the toolbar configurator. |
|
17 |
[#2013657] by pfrenssen: Allow other modules to alter the default settings. |
|
18 |
[#2236367] by greenSkin: Add $conf array to ckeditor_settings alter hook. |
|
19 |
[#1452544] by covenantd, RedRat: DrupalPageBreak button not visible when using Smart Paging module. |
|
20 |
[#2231005] by ChinggizKhan: Only set "window.CKEDITOR_BASEPATH" when it isnt already set. |
|
21 |
[#1659576] by ChinggizKhan: Text of "Switch to plain text editor" link doesn't toggle. |
|
22 |
[#2043365] by Erik Erskine, Danny_Joris: CKEditor profile exported as feature with filter format does not import properly. |
|
23 |
[#2234971] by wwalc: Adjust the default toolbars. |
|
24 |
[#2234967] by wwalc: Add support for loading CKEditor from remote URL. |
|
25 |
[#2234943] by wwalc: Use the moono icons in the administration area. |
|
26 |
[#2127467] by wwalc: Support Pantheon Live Environment. |
|
27 |
[#1971566] by wwalc: Mediaembed throws JS error with ACF enabled. |
|
28 |
[#1950498] by wwalc: Advanced Content Filter introduced in CKEditor 4.1 is now configurable in CKEditor profile. |
|
29 |
[#1971502] by wwalc: Mediaembed plugin should define allowedContent for ACF. |
|
30 |
|
|
1 | 31 |
2013-04-12 |
2 | 32 |
New stable release 7.x-1.13 |
3 | 33 |
|
drupal7/sites/all/modules/ckeditor/README.txt | ||
---|---|---|
1 |
TABLE OF CONTENTS |
|
2 |
----------------- |
|
3 |
* Overview |
|
4 |
* More Information and License |
|
5 |
* Requirements |
|
6 |
* Installation Paths |
|
7 |
* Installation / Configuration |
|
8 |
* Installation Troubleshooting |
|
9 |
* Uploading Images and Files |
|
10 |
* Installing CKFinder |
|
11 |
* Managing Plugins |
|
12 |
* Installing Additional Plugins |
|
13 |
* Integrating a Plugin with the CKEditor Module (for Plugin Developers) |
|
14 |
* Setting up Security Filters |
|
15 |
* HTML Filters and Inline Styling |
|
16 |
* Integrating a Custom Security Filter with the CKEditor Module (for Developers) |
|
17 |
* Upgrading Instructions |
|
18 |
* Help & Contribution |
|
19 |
* Credits |
|
20 |
|
|
21 |
Overview |
|
22 |
-------- |
|
1 |
About CKEditor for Drupal |
|
2 |
------------------------- |
|
23 | 3 |
This module allows Drupal to replace textarea fields with CKEditor. |
24 | 4 |
CKEditor is an online rich text editor that can be embedded inside web pages. |
25 | 5 |
It is a WYSIWYG (What You See Is What You Get) editor which means that the |
... | ... | |
29 | 9 |
OpenOffice.org Writer. CKEditor is truly lightweight and does not require any |
30 | 10 |
kind of installation on the client computer. |
31 | 11 |
|
32 |
More Information and License |
|
33 |
---------------------------- |
|
34 |
CKEditor - The text editor for the Internet |
|
35 |
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. |
|
36 |
|
|
37 |
Licensed under the terms of the GNU Lesser General Public License: |
|
38 |
http://www.opensource.org/licenses/lgpl-license.php |
|
39 |
|
|
40 |
For further information visit: |
|
41 |
http://ckeditor.com/ |
|
42 |
|
|
43 |
Requirements |
|
44 |
------------ |
|
45 |
- Drupal 7.x, |
|
46 |
- PHP 5.2 or greater, |
|
47 |
- CKEditor 3.4 or greater. |
|
48 |
You will need to download CKEditor from the official download site: http://ckeditor.com/download. |
|
49 |
It is recommended to always use the latest CKEditor version available. |
|
50 |
|
|
51 |
Installation Paths |
|
52 |
------------------ |
|
53 |
It is recommended to install the CKEditor for Drupal module in the "sites/all/modules" directory. |
|
54 |
|
|
55 |
When adding the files for standalone CKEditor and CKFinder, you can use one of the following directories: |
|
56 |
- "sites/all/modules/ckeditor/" |
|
57 |
- "sites/all/libraries/" |
|
58 |
and create a "ckeditor" or "ckfinder" directory inside. |
|
59 |
|
|
60 |
The CKEditor module will automatically recognize the proper path to the editor and the file browser. |
|
61 |
|
|
62 |
All installation and configuration instructions in this README file assume that you use the first option and place the CKEditor and CKFinder files in the "sites/all/modules/ckeditor/" directory. If you want to use the "sites/all/libraries/" directory, you will need to adjust the paths given in the instructions accordingly. |
|
63 |
|
|
64 |
Installation / Configuration |
|
65 |
---------------------------- |
|
66 |
Note: these instructions assume that you install the CKEditor for Drupal module in the |
|
67 |
"sites/all/modules" directory (recommended). |
|
68 |
|
|
69 |
1. Unzip the module files to the "sites/all/modules" directory. It should now |
|
70 |
contain a "ckeditor" directory. |
|
71 |
2. Download standalone CKEditor from http://ckeditor.com/download. Unzip the |
|
72 |
contents of the "ckeditor" directory from the installation package to the |
|
73 |
"sites/all/modules/ckeditor/ckeditor" (or "sites/all/libraries/ckeditor") directory. |
|
74 |
Note: you can skip uploading the "_samples" and "_source" folders. |
|
75 |
3. Enable the module in the "Administration panel > Modules > User Interface" section. |
|
76 |
4. Grant permissions for using CKEditor in the |
|
77 |
"Administration panel > People > Permissions" section. |
|
78 |
Note: In order to enable the file browser, refer to the |
|
79 |
"Installing CKFinder" section. |
|
80 |
5. Adjust CKEditor profiles in the |
|
81 |
"Administration panel > Configuration > Content Authoring > CKEditor" section. |
|
82 |
Profiles determine which options are available to users based on the input format system. |
|
83 |
6. For the Rich Text Editing to work you also need to configure your filters |
|
84 |
for the users that may access Rich Text Editing. |
|
85 |
Either grant those users Full HTML access or use the following tags: |
|
86 |
<a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> |
|
87 |
<br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> |
|
88 |
<del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> |
|
89 |
<cite> <embed> <object> <param> <strike> <caption> <tbody> |
|
90 |
To make copying the list easier, below all tags were placed in one line: |
|
91 |
<a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <embed> <object> <param> <strike> <caption> <tbody> |
|
92 |
If you are going to use CKEditor with the Filtered HTML input format, |
|
93 |
please refer to the "HTML Filters and Inline Styling" section. |
|
94 |
7. To have better control over line breaks, you may disable the line break converter |
|
95 |
for a given text format in the "Administration panel > Configuration > Content authoring > Text formats" section (recommended). |
|
96 |
8. Modify the ckeditor.config.js file to adjust it to your needs (optional). |
|
97 |
Configuration options are described here: |
|
98 |
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html |
|
99 |
Developer's documentation for CKEditor: |
|
100 |
http://docs.cksource.com/CKEditor_3.x/Developers_Guide |
|
101 |
WARNING: Remember to clear the browser cache after you have modified any of the JavaScript files. |
|
102 |
If you skip this step, you may notice that the browser is ignoring your changes. |
|
103 |
|
|
104 |
Installation Troubleshooting |
|
105 |
---------------------------- |
|
106 |
If CKEditor does not appear on the page, check if all files were extracted correctly. |
|
107 |
|
|
108 |
The "sites/all/modules/ckeditor/ckeditor/" directory should contain the following files: |
|
109 |
ckeditor.js, config.js, contents.css |
|
110 |
and directories: "skins", "themes", "lang", "images". |
|
111 |
|
|
112 |
The correct directory structure is as follows: |
|
113 |
modules <dir> |
|
114 |
ckeditor <dir> |
|
115 |
ckeditor.module |
|
116 |
ckeditor.admin.inc |
|
117 |
... |
|
118 |
ckeditor <dir> |
|
119 |
_source <dir> |
|
120 |
images <dir> |
|
121 |
lang <dir> |
|
122 |
plugins <dir> |
|
123 |
skins <dir> |
|
124 |
themes <dir> |
|
125 |
COPY_HERE.txt |
|
126 |
ckeditor.js |
|
127 |
... |
|
128 |
|
|
129 |
As noted above, alternatively the "sites/all/libraries/ckeditor" directory can be used. |
|
130 |
The "libraries" directory is the default path when drush is used to download the editor JavaScript code. |
|
131 |
|
|
132 |
If you are still experiencing problems with your CKEditor installation, scroll down to the "Help & Contribution" section. |
|
133 |
|
|
134 |
Uploading Images and Files |
|
135 |
-------------------------- |
|
136 |
There are two methods for uploading files: |
|
137 |
- by using a commercial file browser like CKFinder (http://ckfinder.com), an advanced Ajax file manager; |
|
138 |
- by using modules like IMCE. |
|
139 |
|
|
140 |
To select a preferred file browser, adjust CKEditor profiles in the |
|
141 |
"Administration panel > Configuration > Content Authoring > CKEditor" section. |
|
142 |
In the "File browser settings" section you can choose which file browser will be used for each profile. |
|
143 |
Note: in order to choose an upload module other than CKFinder, you should install an appropriate Drupal module first. |
|
144 |
|
|
145 |
Installing CKFinder |
|
146 |
------------------- |
|
147 |
CKFinder is an Ajax-based file manager created by CKEditor developers: http://ckfinder.com/. |
|
148 |
|
|
149 |
1. Download CKFinder for PHP: http://ckfinder.com/download |
|
150 |
2. Unpack CKFinder to the directory containing the CKEditor module and place it in the |
|
151 |
"sites/all/modules/ckeditor/ckfinder" (or "sites/all/libraries/ckfinder") folder. |
|
152 |
The correct directory structure is as follows: |
|
153 |
|
|
154 |
modules <dir> |
|
155 |
ckeditor <dir> |
|
156 |
ckeditor.module |
|
157 |
ckeditor.admin.inc |
|
158 |
... |
|
159 |
ckeditor <dir> |
|
160 |
_source <dir> |
|
161 |
images <dir> |
|
162 |
ckeditor.js |
|
163 |
... |
|
164 |
ckfinder <dir> |
|
165 |
core <dir> |
|
166 |
ckfinder.php |
|
167 |
config.php |
|
168 |
... |
|
169 |
|
|
170 |
3. Grant the "CKFinder access" permission in the "Administration panel > People > Permissions" section. |
|
171 |
Note: if you do not see this permission, it means that CKEditor did not find CKFinder |
|
172 |
and you have probably uploaded CKFinder into a wrong directory. |
|
173 |
4. Open the CKFinder configuration file (ckfinder/config.php) and do the following: |
|
174 |
|
|
175 |
I) Remove the CheckAuthentication() function: |
|
176 |
(do not worry, this function is defined in filemanager.config.php, see below) |
|
177 |
|
|
178 |
function CheckAuthentication() <- remove it |
|
179 |
{ <- remove it |
|
180 |
//WARNING : DO NOT simply... <- remove it |
|
181 |
... <- remove it |
|
182 |
return false; <- remove it |
|
183 |
} <- remove it |
|
184 |
|
|
185 |
II) Add: |
|
186 |
|
|
187 |
- for CKFinder installed in the "sites/all/modules/ckeditor/ckfinder" directory: |
|
188 |
require_once '../../../../includes/filemanager.config.php'; |
|
189 |
|
|
190 |
- for CKFinder installed in the "sites/all/libraries/ckfinder" directory: |
|
191 |
require_once '../../../../../modules/ckeditor/includes/filemanager.config.php'; |
|
192 |
|
|
193 |
straight below the following line: |
|
194 |
|
|
195 |
$baseDir = resolveUrl($baseUrl); |
|
196 |
|
|
197 |
5. Open the Drupal settings file (sites/default/settings.php) and do the following: |
|
198 |
|
|
199 |
I) Uncomment the $base_url variable and set the base URL of your website (without the trailing slash). |
|
200 |
|
|
201 |
II) Uncomment the $cookie_domain variable and set the domain name of your website. |
|
202 |
|
|
203 |
6. Select CKFinder as a preferred file browser in the |
|
204 |
"Administration panel > Configuration > Content Authoring > CKEditor" section |
|
205 |
(for a selected CKEditor profile scroll down to the "File browser settings" section). |
|
206 |
In the "File browser settings" section you may also change destination folders for files uploaded with CKFinder. |
|
207 |
|
|
208 |
Managing Plugins |
|
209 |
---------------- |
|
210 |
If you want to manage CKEditor plugins for a profile, go to the "Administration panel > Configuration > Content Authoring > CKEditor" section. This section lets you choose plugins relevant for each CKEditor profile from a list. |
|
211 |
In order to activate a plugin, go to the "Editor appearance > Plugins" section and select the checkbox next to a required plugin name. |
|
212 |
|
|
213 |
If a plugin contains toolbar buttons, you will need to drag and drop them to an appropriate toolbar position by using the toolbar wizard. If this is the case, the button should be added to the CKEditor toolbar by using the method described below: |
|
214 |
- Enter the "Editor appearance > Toolbar" section. |
|
215 |
- Check whether the plugin button that you want to use is present in the "Used buttons" sections. If not, find it in the "All buttons" section and drag and drop to the toolbar configuration from the "Used buttons" section. |
|
216 |
|
|
217 |
Alternatively, if you turned off the toolbar wizard and prefer to enter the toolbar configuration manually, you will need to add the plugin button by yourself by appending it to your toolbar definition code. |
|
218 |
|
|
219 |
Please note that some plugins require installing additional modules to work correctly. |
|
220 |
|
|
221 |
Installing Additional Plugins |
|
222 |
----------------------------- |
|
223 |
The installation process is based on placing the plugin folder in the "plugins" directory of the CKEditor module (usually "sites/all/modules/ckeditor"). |
|
224 |
The plugin folder should contain at least the plugin.js file that is responsible for the plugin logic. |
|
225 |
The plugin description will be displayed in the "Administration panel" if it is added to the plugin.js file by using the following special comment: |
|
226 |
/** |
|
227 |
* @file Plugin description |
|
228 |
*/ |
|
229 |
Hint: The "Administration panel" automatically detects the toolbar buttons available in the plugin and adds them to the toolbar wizard. |
|
230 |
|
|
231 |
A plugin can be enabled by using the same method as described above - see the "Managing Plugins" section. |
|
232 |
|
|
233 |
Integrating a Plugin with the CKEditor Module (for Plugin Developers) |
|
234 |
--------------------------------------------------------------------- |
|
235 |
Integrating your application with the CKEditor module by adding a plugin works through a special hook. |
|
236 |
An example of the hook is shown below: |
|
237 |
|
|
238 |
function MODULENAME_ckeditor_plugin() { |
|
239 |
return array( |
|
240 |
'plugin_name' => array( |
|
241 |
// Plugin name. |
|
242 |
'name' => 'plugin_name', |
|
243 |
// Plugin description - it will be displayed in the plugins management section of the profile settings. |
|
244 |
'desc' => t('Plugin description'), |
|
245 |
// The full path to the CKEditor plugin directory, trailing slash included. |
|
246 |
'path' => drupal_get_path('module', 'my_module') . '/plugin_dir/', |
|
247 |
// Plugin buttons definition (optional). |
|
248 |
'buttons' => array( |
|
249 |
'button_name' => array('label' => 'Button label', 'icon' => '/path/to/icon/image'), |
|
250 |
'button_name' => array('label' => 'Button label', 'icon' => '/path/to/icon/image'), |
|
251 |
... |
|
252 |
) |
|
253 |
) |
|
254 |
); |
|
255 |
} |
|
256 |
Please note that MODULENAME in the code above is the name of the module. |
|
257 |
|
|
258 |
After the hook is used the plugin will automatically appear on the plugin list for each CKEditor profile where you will be able to enable it as described in the "Managing Plugins" section. |
|
259 |
|
|
260 |
Setting up Security Filters |
|
261 |
--------------------------- |
|
262 |
The CKEditor security system protects you from executing malicious code that is already in your database. In plain textareas database content is harmless because it is not executed, but a WYSIWYG editor interprets HTML like a Web browser and thus the content needs to be filtered before it is loaded. |
|
263 |
|
|
264 |
In order to configure the security filters, go to the "Administration panel > Configuration > Content Authoring > CKEditor" section. Enter the profile configuration and go to the "Security" section. |
|
265 |
|
|
266 |
The "Security" section lists all the security filters that are currently supported by the CKEditor for Drupal module along with their status for each text format. |
|
267 |
|
|
268 |
The CKEditor for Drupal module has built-in support for some popular security filter modules which you will need to download and install by yourself first. Visit the official websites for each module in order to get the files and find installation and configuration instructions. |
|
269 |
|
|
270 |
When a filter module is installed, you will be able to configure its security filters and enable for a given text format. The list of active text formats is displayed in the "Security" section along with the links that will take you to the "Administration panel > Configuration > Content authoring > Text formats" section where you will be able to configure the filters for each of the text formats. The filters will then be run on the content during the filtering process. |
|
271 |
|
|
272 |
The "Security Settings" option in the "Security" section lets you choose whether to always run the security filters on CKEditor content (recommended and default option) or run them only when CKEditor is set to start automatically. If you change this setting to only run the filters when CKEditor starts automatically, you will not be protected when toggling manually between a plain textarea and the WYSIWYG editor. |
|
273 |
|
|
274 |
The following security filter modules are currently supported: |
|
275 |
- HTML Purifier - http://drupal.org/project/htmlpurifier |
|
276 |
- htmLawed - http://drupal.org/project/htmLawed |
|
277 |
- Htmltidy - http://drupal.org/project/htmltidy |
|
278 |
- WYSIWYG Filter - http://drupal.org/project/wysiwyg_filter |
|
279 |
|
|
280 |
HTML Filters and Inline Styling |
|
281 |
------------------------------- |
|
282 |
In the "Administration panel > Configuration > Content Authoring > Text fromats" section, Filtered HTML is the default filter. |
|
283 |
Due to security reasons enabling Full HTML is only an option for trusted users. |
|
284 |
|
|
285 |
To take full advantage of using CKEditor you can extend the list of allowed tags in the HTML filter that is enabled in the Filtered HTML input format. If you do not do this, you may notice that a page created in CKEditor looks different after saving. |
|
286 |
|
|
287 |
Unfortunately, even if you extend the list of allowed tags, one problem still remains: Filtered HTML not only strips disallowed tags, but also strips inline style definitions. It basically means that you are unable to apply a different font color, size or family, align images etc. using CKEditor out of the box. |
|
288 |
|
|
289 |
You can solve this problem by creating another input format that will work in a similar way as Filtered HTML (will only allow specified tags), but in a much better way - i.e. it will not strip inline styles that CKEditor is using when |
|
290 |
formatting text or images after the page is saved. To create such an input format, you will need an HTML filter. See the list of HTML filter modules that are supported by the CKEditor module in the "Setting up Security Filters" section above. |
|
291 |
|
|
292 |
It is up to you to decide which one to use. Just make sure that you will only allow to use proper inline styles, tags, and attributes. |
|
293 |
|
|
294 |
Integrating a Custom Security Filter with the CKEditor Module (for Developers) |
|
295 |
------------------------------------------------------------------------------ |
|
296 |
Integrating your application with the CKEditor module by adding a security filter works through a special hook. |
|
297 |
An example of the hook is shown below: |
|
298 |
|
|
299 |
function MODULENAME_ckeditor_security_filter() { |
|
300 |
return array( |
|
301 |
'security_filter_name' => array( |
|
302 |
// Security filter title - it would be displayed in the "Security > Security filters" section of profile settings. |
|
303 |
'title' => t('Security filter title'), |
|
304 |
// Security filter description - it would be displayed in the "Security > Security filters" section of profile settings. |
|
305 |
'description' => t('Security filter description'), |
|
306 |
) |
|
307 |
); |
|
308 |
} |
|
309 |
Please note that MODULENAME in the code above is the name of the module. |
|
310 |
|
|
311 |
After the hook is used the security filter will automatically appear on the filters list for each CKEditor profile where you will be able to enable it as described in the "Setting up Filters" section. |
|
312 |
|
|
313 |
Upgrading Instructions |
|
314 |
---------------------- |
|
315 |
This instruction assumes that you are upgrading the CKEditor module [M] and CKEditor (the editor) [E] at the same time. |
|
316 |
Instructions specific for module upgrades are tagged with [M]. Steps that must be taken when upgrading CKEditor (the editor) are marked with [E]. |
|
317 |
|
|
318 |
1. [M] Download the latest version of the CKEditor module from http://drupal.org/project/ckeditor (it is advised to read the release notes before going further). |
|
319 |
2. [E] Download the latest version of CKEditor from http://ckeditor.com/download (it is advised to read the "What's New" page before going further: http://ckeditor.com/whatsnew). |
|
320 |
3. [M] Back up your database. |
|
321 |
4. [EM] Place the site in the "Off-line" mode to let the database updates run without interruption and to avoid displaying errors to end users of the site. |
|
322 |
5. [E] If you are using CKFinder, make sure you will not delete it, and move it to a safe place. |
|
323 |
6. [E] If you introduced any changes (e.g. custom toolbar definitions etc.) in the sites/all/modules/ckeditor/ckeditor.config.js file (or sites/all/modules/ckeditor/ckeditor/config.js), write down your changes and add them again after uploading new files. |
|
324 |
In general, try to avoid making any changes to CKEditor's config.js file and add everything to ckeditor.config.js. |
|
325 |
7. Delete old files: |
|
326 |
[EM]* Simply remove the "modules/ckeditor" directory if upgrading both the editor and the module. |
|
327 |
[M] If you are upgrading the module only, remember to leave the "modules/ckeditor/ckeditor" directory untouched. |
|
328 |
[E] When upgrading the editor, remove the contents of the "modules/ckeditor/ckeditor" directory only. |
|
329 |
WARNING: If you do not remove old files and just rename the "ckeditor" directory instead (e.g. to "ckeditor_old"), Drupal may use the module from the renamed "ckeditor_old" directory. |
|
330 |
8. [M] Upload the CKEditor module (extracted files and folders) to the "sites/all/modules" directory. |
|
331 |
9. [E] Upload standalone CKEditor (extracted files and folders from the "ckeditor" directory) to the "sites/modules/ckeditor/ckeditor" directory (i.e. where the COPY HERE.txt file exists). |
|
332 |
10. [E] Restore the CKFinder files from where you copied them (see step 5). |
|
333 |
11. [E] Apply your modifications to default configuration in the ckeditor.config.js file (see step 6). |
|
334 |
12. [M] Run update.php. |
|
335 |
13. [EM] Put the site back online. |
|
336 |
|
|
337 |
Help & Contribution |
|
338 |
------------------- |
|
12 |
Help & Documentation |
|
13 |
-------------------- |
|
339 | 14 |
If you are looking for more information, have any trouble with the configuration of the module |
340 |
or if you found an issue, please visit the official project page:
|
|
15 |
or found an issue, please visit the official project page: |
|
341 | 16 |
http://drupal.org/project/ckeditor |
342 | 17 |
|
343 |
Having problems? Take a look at the list of common problems when installing CKEditor: |
|
344 |
http://docs.cksource.com/CKEditor_for_Drupal/Troubleshooting |
|
345 |
|
|
346 |
Learn how to adjust CKEditor to your theme and configure the spellchecker: |
|
347 |
http://docs.cksource.com/CKEditor_for_Drupal/Tricks |
|
18 |
Extensive CKEditor for Drupal documentation is available at: |
|
19 |
http://docs.cksource.com/CKEditor_for_Drupal/Open_Source/Drupal_7 |
|
348 | 20 |
|
21 |
Contribution |
|
22 |
------------ |
|
349 | 23 |
If you would like to help in the development of the module, we encourage you to join our team. |
350 | 24 |
Any help will be greatly appreciated! |
351 | 25 |
|
352 |
Credits |
|
353 |
------- |
|
354 |
- CKEditor for Drupal is currently maintained by the CKEditor team and Jorrit Schippers. |
|
355 |
http://ckeditor.com/ |
|
26 |
Module Information and License |
|
27 |
---------------------------- |
|
28 |
CKEditor - The text editor for the Internet |
|
29 |
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. |
|
30 |
http://cksource.com/ |
|
356 | 31 |
|
357 |
- CKEditor - The text editor for the Internet |
|
358 |
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. |
|
359 |
http://cksource.com/ |
|
32 |
Licensed under the terms of the GNU Lesser General Public License: |
|
33 |
http://www.opensource.org/licenses/lgpl-license.php |
|
34 |
|
|
35 |
For further information visit: |
|
36 |
http://ckeditor.com/ |
drupal7/sites/all/modules/ckeditor/TROUBLESHOOTING.txt | ||
---|---|---|
1 |
|
|
2 |
Note: the HTML version of this file (always up-to-date) is available online: http://drupal.ckeditor.com/troubleshooting |
|
3 |
|
|
4 |
CONTENTS OF THIS FILE |
|
5 |
--------------------- |
|
6 |
|
|
7 |
* CKEditor does not work in my theme |
|
8 |
* Known module incompatibilities |
|
9 |
* Images are not displayed when submitted |
|
10 |
* I followed the instructions, but CKEditor does not show up (+ debugging instructions) |
|
11 |
* Selected toolbar does not show for user 1 |
|
12 |
* The CKEditor component is not installed correctly |
|
13 |
* CKEditor does not work after upgrading |
|
14 |
* Text alignment does not work |
|
15 |
* Line breaks removed when editing content previously authored without using CKEditor |
|
16 |
* I successfully uploaded an image, but cannot see it in the file browser |
|
17 |
* Quote symbols are being changed to quote entities |
|
18 |
|
|
19 |
CKEditor does not work in my theme |
|
20 |
---------------------------------- |
|
21 |
|
|
22 |
Your theme may be missing the following code: |
|
23 |
|
|
24 |
<?php print $scripts; ?> |
|
25 |
|
|
26 |
Add that line of code to the head section of your theme. |
|
27 |
|
|
28 |
Another possibility is that the following code might be missing in your theme: |
|
29 |
|
|
30 |
<?php print $closure; ?> |
|
31 |
|
|
32 |
The solution is similar as above - you need to add that line to your theme at the end of its code. |
|
33 |
|
|
34 |
Finally, you can also switch to a different theme. |
|
35 |
|
|
36 |
Known module incompatibilities |
|
37 |
------------------------------ |
|
38 |
|
|
39 |
At the moment CKEditor will not show up when the following modules are enabled: |
|
40 |
|
|
41 |
* Theme developer (http://drupal.org/node/318941) |
|
42 |
* Theme Builder (http://drupal.org/node/271032) |
|
43 |
|
|
44 |
Images are not displayed when submitted |
|
45 |
--------------------------------------- |
|
46 |
|
|
47 |
Most probably you need to properly configure the input format. Either set it to "Full HTML" or add the <img> tag to the "Filtered HTML" format. |
|
48 |
The full list of tags that should be allowed is available in the README.txt file. |
|
49 |
Make sure that you have read the "Setting up filters" section in the README.txt file or on this page: http://drupal.ckeditor.com/filters |
|
50 |
|
|
51 |
I followed the instructions, but CKEditor does not show up |
|
52 |
---------------------------------------------------------- |
|
53 |
|
|
54 |
First of all make sure that CKEditor is enabled on this specific page. |
|
55 |
Take a look into the source code of your page and search for something similar to: |
|
56 |
"ckeditor": { "module_path": |
|
57 |
|
|
58 |
If you cannot find such code, it means that CKEditor is disabled on that page/field. |
|
59 |
Make sure that you have the right permissions to use CKEditor and check your CKEditor profile (include/exclude settings, minimum rows value). |
|
60 |
|
|
61 |
If CKEditor is enabled, but it does not show up, try the following steps: |
|
62 |
|
|
63 |
1. Switch to the default theme (Garland). If CKEditor appears, read the "CKEditor does not work in xxx theme" instructions. |
|
64 |
If your theme already contains the "closure" and "scripts" statements, read below. |
|
65 |
2. Make sure that you are using a browser that is compatible with CKEditor. |
|
66 |
3. On some occasions other installed modules may cause CKEditor not to show up (although if you look at page source, you will see the CKEditor code). |
|
67 |
Instead of CKEditor you may see a very small textarea. |
|
68 |
This mostly happens when some other module causes a JavaScript error and CKEditor cannot load because of this. |
|
69 |
To check this: |
|
70 |
- Write down the list of currently installed modules. |
|
71 |
- Disable all additional modules. |
|
72 |
- If CKEditor shows up, start enabling the modules that you disabled in the previous step and find out which module is incompatible with CKEditor. |
|
73 |
Use the project's site to report a new bug and provide the following details: |
|
74 |
* Drupal version, |
|
75 |
* CKEditor module version, |
|
76 |
* CKEditor version, |
|
77 |
* The name and version of the incompatible module. |
|
78 |
* If additional steps are required to reproduce this issue, like creating a new special content or configuring this additional module in a special way, provide a detailed list of steps to follow. |
|
79 |
- If the step above did not help, disable all additional modules and switch to the Garland theme. Clear the browser cache. |
|
80 |
If CKEditor still does not work, it means that it may be corrupted. |
|
81 |
Upload CKEditor again using an FTP client that warns you when files are truncated or corrupted. |
|
82 |
- If CKEditor works for the Garland theme with all modules enabled, but it does not work for your theme with all modules disabled, then your theme is a problem. |
|
83 |
Use the project's site to report a new bug and provide the following details: |
|
84 |
* Drupal version, |
|
85 |
* CKEditor module version, |
|
86 |
* CKEditor version, |
|
87 |
* The name and version of the incompatible theme. |
|
88 |
4. Finally, if nothing helped, to find out where exactly the error occurred, you may use Firefox with the Firebug extension. |
|
89 |
Use the project's site to create a new support request providing as much information as possible, including the exact JavaScript error message that you got. |
|
90 |
|
|
91 |
Selected toolbar does not show for user 1 |
|
92 |
----------------------------------------- |
|
93 |
|
|
94 |
There are two reasons why you are seeing a different toolbar (or do not see CKEditor at all): |
|
95 |
|
|
96 |
- If "Allow users to customize CKEditor appearance" is enabled, each user |
|
97 |
may override the profile settings in the "Rich text editor settings" section of the admin/user/N/edit page |
|
98 |
("My Account" -> "Edit") |
|
99 |
|
|
100 |
- A different profile is used for user 1 than you expect. |
|
101 |
User 1 must be assigned a system role that corresponds to the privileges required. |
|
102 |
If no role is assigned to User 1, they will have the privileges of an "authenticated user" |
|
103 |
(usually it is the "Advanced" profile). |
|
104 |
|
|
105 |
The CKEditor component is not installed correctly |
|
106 |
------------------------------------------------- |
|
107 |
|
|
108 |
Please remember that installing the CKEditor module is a two-step process. You need to download and unpack: |
|
109 |
- the CKEditor module that integrates CKEditor with Drupal; |
|
110 |
- CKEditor, the rich text editor. |
|
111 |
|
|
112 |
If your CKEditor does not show, you should check whether all files were extracted correctly. |
|
113 |
The /modules/ckeditor/ckeditor/ directory should contain the following files: |
|
114 |
ckeditor.js, config.js, contents.css as well as directories named "skins", "themes", "lang", "images". |
|
115 |
|
|
116 |
The correct directory structure is as follows: |
|
117 |
modules <dir> |
|
118 |
ckeditor <dir> |
|
119 |
ckeditor.module |
|
120 |
ckeditor.admin.inc |
|
121 |
... |
|
122 |
ckeditor <dir> |
|
123 |
_source <dir> |
|
124 |
images <dir> |
|
125 |
lang <dir> |
|
126 |
plugins <dir> |
|
127 |
skins <dir> |
|
128 |
themes <dir> |
|
129 |
COPY_HERE.txt |
|
130 |
ckeditor.js |
|
131 |
... |
|
132 |
|
|
133 |
CKEditor does not work after upgrading |
|
134 |
-------------------------------------- |
|
135 |
|
|
136 |
This may be caused by the browser cache. Clear your browser cache and restart the browser if clearing the cache did not help. |
|
137 |
If you upgraded the CKEditor module, make sure that all roles with "access ckeditor" permissions are assigned to at least one CKEditor profile. |
|
138 |
|
|
139 |
Text alignment does not work |
|
140 |
---------------------------- |
|
141 |
|
|
142 |
In the ckeditor.config.js file (located in the CKEditor module directory), the following classes are defined to provide the text alignment functionality: |
|
143 |
config.justifyClasses = [ 'rteleft', 'rtecenter', 'rteright', 'rtejustify' ]; |
|
144 |
|
|
145 |
Unfortunately, some themes may override these styles and text alignment may not work as expected. |
|
146 |
If you are using the Full HTML input format, you may simply comment out this line: |
|
147 |
//config.justifyClasses = [ 'rteleft', 'rtecenter', 'rteright', 'rtejustify' ]; |
|
148 |
|
|
149 |
CKEditor will then use inline styles instead: <p style="text-align: right;">sample text</p>. |
|
150 |
The problem is that inline styles may only be used with the Full HTML format. |
|
151 |
Filtered HTML will strip that code, so do not use this solution with this input format. |
|
152 |
|
|
153 |
For Filtered HTML things are a bit more complicated. For example if your theme defines such CSS style: |
|
154 |
|
|
155 |
.content p { text-align: left; } |
|
156 |
|
|
157 |
the text-align property set in the .rteright class will not work. |
|
158 |
To align the <p> tag, you will have to edit the modules/ckeditor/ckeditor.css file and create a style that will be applied to the <p> tag: |
|
159 |
|
|
160 |
.content p.rteleft { |
|
161 |
text-align: left; |
|
162 |
} |
|
163 |
.content p.rteright { |
|
164 |
text-align: right; |
|
165 |
} |
|
166 |
.content p.rtecenter { |
|
167 |
text-align: center; |
|
168 |
} |
|
169 |
.content p.rtejustify { |
|
170 |
text-align: justify; |
|
171 |
} |
|
172 |
|
|
173 |
Use DOM inspector (in Firefox) to check why the alignment does not work and to correct your CSS styles. |
|
174 |
There is no universal workaround for this situation. |
|
175 |
|
|
176 |
Line breaks removed when editing content previously authored without using CKEditor |
|
177 |
----------------------------------------------------------------------------------- |
|
178 |
|
|
179 |
The problem lies in the way you configured your input filters. |
|
180 |
Before you enabled CKEditor, you probably had the Line break converter enabled. |
|
181 |
|
|
182 |
Now you are trying to edit the same content with the Line break converter disabled, thus the line breaks are removed. |
|
183 |
|
|
184 |
Possible workarounds: |
|
185 |
* Enable the Line break converter (not recommended). |
|
186 |
* Create a new input format with the Line break converter enabled. Use it just for old articles (recommended). |
|
187 |
* Start with CKEditor disabled by default, replace all new line characters manually with a <br> tag, then use toggle to switch to WYSIWYG mode. |
|
188 |
|
|
189 |
If you are a PHP programmer, you may try the approach proposed by BakerQ in http://drupal.org/node/240633 |
|
190 |
|
|
191 |
Quote symbols are being changed to quote entities |
|
192 |
------------------------------------------------- |
|
193 |
|
|
194 |
Some modules like Typogrify or SmartyPants require special handling of HTML entities. |
|
195 |
For example, by default CKEditor will convert a double quote character (") to ". |
|
196 |
To disable processing of HTML entities, add the following line to the modules/ckeditor/ckeditor.config.js file: |
|
197 |
|
|
198 |
config.entities = false; |
|
199 |
|
|
200 |
It is also possible to disable processing of HTML entities for a selected CKEditor profile by adding the following line in "Advanced Options" -> "Custom JavaScript configuration": |
|
201 |
|
|
202 |
entities = false; |
|
203 |
|
|
204 |
CKEditor toolbar does not show up |
|
205 |
--------------------------------- |
|
206 |
|
|
207 |
If the CKEditor toolbar does not show up and the styles/themes seem to be corrupted, it is possible that you uploaded the files via FTP in the ASCII mode. |
|
208 |
Make sure you are uploading the files in the binary mode. |
|
209 |
|
|
210 |
CKEditor adds <p> </p> |
|
211 |
--------------------------- |
|
212 |
|
|
213 |
Sometimes you may notice that when editing nodes, the spacing between paragraphs is being doubled. |
|
214 |
This may be caused by the HTML Purifier module when the AutoParagraph option is enabled. |
|
215 |
When you disable it, make sure you clear the HTML Purifier cache. |
drupal7/sites/all/modules/ckeditor/UPGRADE.txt | ||
---|---|---|
1 |
## Upgrade vs. Update ## |
|
2 |
|
|
3 |
Before you continue reading you need to understand the difference between "upgrading" and "updating". |
|
4 |
|
|
5 |
"Upgrading" refers to moving from one major release to another. |
|
6 |
E.g. you are moving from Drupal 6 to Drupal 7. |
|
7 |
|
|
8 |
"Updating" typically refers to bringing the editor or CKEditor module up to the latest minor version (e.g 7.x-1.0 to 7.x-1.2). |
|
9 |
Updating instructions are available in the README.txt file. |
|
10 |
|
|
11 |
## Upgrading the CKEditor module from 6.x to 7.x ## |
|
12 |
|
|
13 |
Due to differences between the CKEditor module for Drupal 6 and Drupal 7 there is no way (at least at the moment) |
|
14 |
to upgrade without uninstalling the previous version of the module (and losing the configuration settings stored in the database). |
|
15 |
|
|
16 |
# Upgrading # |
|
17 |
|
|
18 |
1. Backup the "ckeditor_role" and "ckeditor_settings" tables |
|
19 |
and write down your custom configuration settings stored in the CKEditor profiles. |
|
20 |
2. Disable and uninstall the CKEditor 6.x module. |
|
21 |
3. Make a backup of the "sites/all/modules/ckeditor" folder or at least make sure to make a copy of the "ckeditor.config.js" file. |
|
22 |
4. Delete the contents of the "sites/all/modules/ckeditor" folder. |
|
23 |
5. Follow the README.txt file to install the CKEditor module for Drupal 7. |
|
24 |
6. Adjust CKEditor profiles to your needs. |
|
25 |
7. If you made any changes to "ckeditor.config.js" in Drupal 6, check the default configuration file distributed with the module for Drupal 7 and re-apply the changes. |
|
26 |
|
|
27 |
|
|
28 |
## Migrating from the FCKeditor module ## |
|
29 |
|
|
30 |
Please refer to the "Upgrading the CKEditor module from 6.x to 7.x" section. |
drupal7/sites/all/modules/ckeditor/ckeditor.api.php | ||
---|---|---|
70 | 70 |
); |
71 | 71 |
} |
72 | 72 |
|
73 |
?> |
|
73 |
/** |
|
74 |
* Hook to alter CKEditor security filters. |
|
75 |
*/ |
|
76 |
function hook_ckeditor_security_filter_alter(&$security_filters) { |
|
77 |
// Modify a $security_filter. |
|
78 |
} |
|
79 |
|
|
80 |
/** |
|
81 |
* Hook to extend/change the ckeditor settings. |
|
82 |
* |
|
83 |
* This hook is invoked from ckeditor_profile_settings_compile(). The settings |
|
84 |
* may be customized or enhanced; typically with options that cannot be |
|
85 |
* controlled though the administrative UI from the ckeditor module. |
|
86 |
* |
|
87 |
* @param $settings |
|
88 |
* An associative array of settings. |
|
89 |
* @param $conf |
|
90 |
* An associative array with access to raw profile settings that might be helpful to alter the real $settings. |
|
91 |
*/ |
|
92 |
function hook_ckeditor_settings_alter(&$settings, $conf) { |
|
93 |
// Change the ckeditor config path. |
|
94 |
$settings['customConfig'] = drupal_get_path('module', 'ckeditor') . '/ckeditor.config.js'; |
|
95 |
} |
|
96 |
|
|
97 |
/** |
|
98 |
* Hook that allows to alter the user default settings. |
|
99 |
* |
|
100 |
* @param $settings |
|
101 |
* An associative array of settings. |
|
102 |
*/ |
|
103 |
function hook_ckeditor_default_settings_alter(&$settings) { |
|
104 |
$settings['show_toggle'] = 'f'; |
|
105 |
} |
drupal7/sites/all/modules/ckeditor/ckeditor.config.js | ||
---|---|---|
23 | 23 |
// side |
24 | 24 |
// (as does Drupal), so just leave this line as is. |
25 | 25 |
config.protectedSource.push(/<\?[\s\S]*?\?>/g); // PHP Code |
26 |
config.protectedSource.push(/<code>[\s\S]*?<\/code>/gi); // Code tags |
|
26 |
|
|
27 |
// [#1762328] Uncomment the line below to protect <code> tags in CKEditor (hide them in wysiwyg mode). |
|
28 |
// config.protectedSource.push(/<code>[\s\S]*?<\/code>/gi); |
|
27 | 29 |
config.extraPlugins = ''; |
28 | 30 |
|
29 | 31 |
/* |
... | ... | |
70 | 72 |
Drupal.settings.cke_toolbar_DrupalAdvanced = [ |
71 | 73 |
['Source'], |
72 | 74 |
['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker', 'Scayt'], |
73 |
['Undo','Redo','Find','Replace','-','SelectAll','RemoveFormat'],
|
|
75 |
['Undo','Redo','Find','Replace','-','SelectAll'], |
|
74 | 76 |
['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar'], |
75 | 77 |
['Maximize', 'ShowBlocks'], |
76 | 78 |
'/', |
77 | 79 |
['Format'], |
78 |
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'], |
|
80 |
['Bold','Italic','Underline','Strike','-','Subscript','Superscript','-','RemoveFormat'],
|
|
79 | 81 |
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'], |
80 |
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiRtl','BidiLtr'], |
|
81 |
['Link','Unlink','Anchor','Linkit','LinkToNode','LinkToMenu'], |
|
82 |
['DrupalBreak', 'DrupalPageBreak'] |
|
82 |
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl'], |
|
83 |
['Link','Unlink','Anchor','Linkit','LinkToNode','LinkToMenu'] |
|
83 | 84 |
]; |
84 | 85 |
|
85 |
// Toolbar definiton for all buttons |
|
86 |
// Toolbar definition for all buttons
|
|
86 | 87 |
Drupal.settings.cke_toolbar_DrupalFull = [ |
87 | 88 |
['Source'], |
88 | 89 |
['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker', 'Scayt'], |
89 |
['Undo','Redo','Find','Replace','-','SelectAll','RemoveFormat'],
|
|
90 |
['Undo','Redo','Find','Replace','-','SelectAll'], |
|
90 | 91 |
['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','Iframe'], |
91 | 92 |
'/', |
92 |
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'], |
|
93 |
['Bold','Italic','Underline','Strike','-','Subscript','Superscript','-','RemoveFormat'],
|
|
93 | 94 |
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'], |
94 |
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiRtl','BidiLtr'],
|
|
95 |
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl','-','Language'],
|
|
95 | 96 |
['Link','Unlink','Anchor','Linkit','LinkToNode', 'LinkToMenu'], |
96 | 97 |
'/', |
97 | 98 |
['Format','Font','FontSize'], |
drupal7/sites/all/modules/ckeditor/ckeditor.info | ||
---|---|---|
4 | 4 |
package = User interface |
5 | 5 |
configure = admin/config/content/ckeditor |
6 | 6 |
|
7 |
; Information added by drupal.org packaging script on 2013-04-12
|
|
8 |
version = "7.x-1.13"
|
|
7 |
; Information added by Drupal.org packaging script on 2014-05-08
|
|
8 |
version = "7.x-1.14"
|
|
9 | 9 |
core = "7.x" |
10 | 10 |
project = "ckeditor" |
11 |
datestamp = "1365759619"
|
|
11 |
datestamp = "1399546428"
|
|
12 | 12 |
|
drupal7/sites/all/modules/ckeditor/ckeditor.install | ||
---|---|---|
49 | 49 |
module_load_include('inc', 'ckeditor', 'includes/ckeditor.lib'); |
50 | 50 |
|
51 | 51 |
//searching ckeditor.js |
52 |
$editor_path = _ckeditor_script_path(); |
|
52 |
$ckeditor_path = _ckeditor_script_path();
|
|
53 | 53 |
//insert default input formats to profiles |
54 | 54 |
db_insert('ckeditor_input_format')->fields(array("name" => "Advanced", "format" => 'filtered_html'))->execute(); |
55 | 55 |
db_insert('ckeditor_input_format')->fields(array("name" => "Full", "format" => 'full_html'))->execute(); |
... | ... | |
67 | 67 |
$arr['default'] = "t"; |
68 | 68 |
$arr['show_toggle'] = "t"; |
69 | 69 |
$arr['popup'] = variable_get('ckeditor_popup', 0) ? "t" : "f"; |
70 |
// <!--break--> does not work in Filtered HTML, so DrupalBreak does not make sense here |
|
71 |
// https://drupal.org/node/881006 |
|
70 | 72 |
$arr['toolbar'] = " |
71 | 73 |
[ |
72 | 74 |
['Source'], |
73 | 75 |
['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker', 'Scayt'], |
74 |
['Undo','Redo','Find','Replace','-','SelectAll','RemoveFormat'],
|
|
76 |
['Undo','Redo','Find','Replace','-','SelectAll'], |
|
75 | 77 |
['Image','Media','Flash','Table','HorizontalRule','Smiley','SpecialChar'], |
76 | 78 |
['Maximize', 'ShowBlocks'], |
77 | 79 |
'/', |
78 | 80 |
['Format'], |
79 |
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'], |
|
81 |
['Bold','Italic','Underline','Strike','-','Subscript','Superscript','-','RemoveFormat'],
|
|
80 | 82 |
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'], |
81 | 83 |
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl'], |
82 |
['Link','Unlink','Anchor', 'Linkit']
|
|
84 |
['Link','Unlink','Anchor','Linkit'] |
|
83 | 85 |
] |
84 | 86 |
"; |
85 | 87 |
$arr['expand'] = variable_get('ckeditor_toolbar_start_expanded', 1) ? "t" : "f"; |
... | ... | |
119 | 121 |
[ |
120 | 122 |
['Source'], |
121 | 123 |
['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker', 'Scayt'], |
122 |
['Undo','Redo','Find','Replace','-','SelectAll','RemoveFormat'],
|
|
124 |
['Undo','Redo','Find','Replace','-','SelectAll'], |
|
123 | 125 |
['Image','Media','Flash','Table','HorizontalRule','Smiley','SpecialChar','Iframe'], |
124 | 126 |
'/', |
125 |
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'], |
|
127 |
['Bold','Italic','Underline','Strike','-','Subscript','Superscript','-','RemoveFormat'],
|
|
126 | 128 |
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'], |
127 |
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl'], |
|
128 |
['Link','Unlink','Anchor', 'Linkit'],
|
|
129 |
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl','-','Language'],
|
|
130 |
['Link','Unlink','Anchor','Linkit'], |
|
129 | 131 |
['DrupalBreak'], |
130 | 132 |
'/', |
131 | 133 |
['Format','Font','FontSize'], |
... | ... | |
140 | 142 |
|
141 | 143 |
$arr = array(); |
142 | 144 |
|
143 |
if ($editor_path) { |
|
144 |
$arr['ckeditor_path'] = $editor_path; |
|
145 |
if (!empty($ckeditor_path)) { |
|
146 |
$arr['ckeditor_path'] = $ckeditor_path; |
|
147 |
} |
|
148 |
else { |
|
149 |
$arr['ckeditor_path'] = '//cdn.ckeditor.com/4.4.0/full-all'; |
|
145 | 150 |
} |
146 | 151 |
|
147 | 152 |
db_insert('ckeditor_settings')->fields(array("name" => "CKEditor Global Profile", "settings" => serialize($arr)))->execute(); |
... | ... | |
238 | 243 |
} |
239 | 244 |
} |
240 | 245 |
} |
241 |
if ((($installed_version = _ckeditor_requirements_getinstalledversion()) !== NULL) && (-1 == version_compare($installed_version, '3.1 SVN')) && $installed_version != '%VERSION%') {
|
|
246 |
if ((($installed_version = _ckeditor_requirements_getinstalledversion()) !== NULL) && $installed_version != '%VERSION%' && $installed_version != '<URL>' && (-1 == version_compare($installed_version, '3.1 SVN'))) {
|
|
242 | 247 |
$requirements['ckeditor']['description'] = t('Some features are disabled because you are using an older version of CKEditor. Please upgrade to CKEditor 3.1 (or higher).'); |
243 | 248 |
$requirements['ckeditor']['severity'] = REQUIREMENT_INFO; |
244 | 249 |
} |
... | ... | |
246 | 251 |
if ($installed_version == '%VERSION%') { |
247 | 252 |
$requirements['ckeditor']['value'] = 'GIT version'; |
248 | 253 |
} |
254 |
else if ($installed_version == '<URL>') { |
|
255 |
$requirements['ckeditor']['value'] = 'Unknown version. CKEditor is loaded from a remote URL.'; |
|
256 |
$requirements['ckeditor']['severity'] = REQUIREMENT_INFO; |
|
257 |
} |
|
249 | 258 |
else { |
250 | 259 |
$requirements['ckeditor']['value'] = $installed_version; |
251 | 260 |
} |
... | ... | |
275 | 284 |
function _ckeditor_requirements_getinstalledversion() { |
276 | 285 |
module_load_include('module', 'ckeditor'); |
277 | 286 |
$editor_path = ckeditor_path('local', TRUE); |
287 |
if ($editor_path == '<URL>') { |
|
288 |
$url = ckeditor_path('url', TRUE); |
|
289 |
$matches = array(); |
|
290 |
if (preg_match("|cdn.ckeditor.com/(\d(\.\d+)+.*)/|i", $url, $matches)) { |
|
291 |
return $matches[1]; |
|
292 |
} |
|
293 |
return '<URL>'; |
|
294 |
} |
|
278 | 295 |
$jspath = $editor_path . '/ckeditor.js'; |
279 | 296 |
|
280 | 297 |
$configcontents = @file_get_contents($jspath); |
... | ... | |
595 | 612 |
); |
596 | 613 |
db_create_table('ckeditor_input_format', $ckeditor_input_format); |
597 | 614 |
} |
598 |
} |
|
615 |
} |
drupal7/sites/all/modules/ckeditor/ckeditor.make | ||
---|---|---|
1 |
api = 2 |
|
2 |
core = 7.x |
|
3 |
|
|
4 |
; Libraries |
|
5 |
libraries[ckeditor][directory_name] = ckeditor |
|
6 |
libraries[ckeditor][download][type] = file |
|
7 |
libraries[ckeditor][download][url] = http://download.cksource.com/CKEditor%20for%20Drupal/edit/ckeditor_4.4.0_edit.zip |
|
8 |
libraries[ckeditor][type] = library |
drupal7/sites/all/modules/ckeditor/ckeditor.module | ||
---|---|---|
98 | 98 |
'title' => 'Add a new CKEditor profile', |
99 | 99 |
'description' => 'Configure the rich text editor.', |
100 | 100 |
'page callback' => 'drupal_get_form', |
101 |
'page arguments' => array('ckeditor_admin_profile_form'), |
|
101 |
'page arguments' => array('ckeditor_admin_profile_form', 'add'),
|
|
102 | 102 |
'file' => 'includes/ckeditor.admin.inc', |
103 | 103 |
'access arguments' => array('administer ckeditor'), |
104 | 104 |
'type' => MENU_CALLBACK, |
... | ... | |
108 | 108 |
'title' => 'Clone the CKEditor profile', |
109 | 109 |
'description' => 'Configure the rich text editor.', |
110 | 110 |
'page callback' => 'drupal_get_form', |
111 |
'page arguments' => array('ckeditor_admin_profile_clone_form', 5), |
|
111 |
'page arguments' => array('ckeditor_admin_profile_clone_form', 'clone', 5),
|
|
112 | 112 |
'file' => 'includes/ckeditor.admin.inc', |
113 | 113 |
'access arguments' => array('administer ckeditor'), |
114 | 114 |
'type' => MENU_CALLBACK, |
... | ... | |
118 | 118 |
'title' => 'Edit the CKEditor profile', |
119 | 119 |
'description' => 'Configure the rich text editor.', |
120 | 120 |
'page callback' => 'drupal_get_form', |
121 |
'page arguments' => array('ckeditor_admin_profile_form', 5), |
|
121 |
'page arguments' => array('ckeditor_admin_profile_form', 'edit', 5),
|
|
122 | 122 |
'file' => 'includes/ckeditor.admin.inc', |
123 | 123 |
'access arguments' => array('administer ckeditor'), |
124 | 124 |
'type' => MENU_CALLBACK, |
... | ... | |
209 | 209 |
} |
210 | 210 |
|
211 | 211 |
$editor_path = ckeditor_path('local', TRUE); |
212 |
if ($editor_path == '<URL>') { |
|
213 |
$url = ckeditor_path('url', TRUE); |
|
214 |
$matches = array(); |
|
215 |
if (preg_match("|cdn.ckeditor.com/(\d(\.\d+)+.*)/|i", $url, $matches)) { |
|
216 |
$ckeditor_version = $matches[1]; |
|
217 |
return $matches[1]; |
|
218 |
} |
|
219 |
return $ckeditor_version = NULL; |
|
220 |
} |
|
221 |
|
|
212 | 222 |
$jspath = $editor_path . '/ckeditor.js'; |
213 | 223 |
|
214 | 224 |
$configcontents = @file_get_contents($jspath); |
... | ... | |
231 | 241 |
} |
232 | 242 |
|
233 | 243 |
/** |
234 |
* Implementation of hook_init().
|
|
244 |
* Implements hook_page_build().
|
|
235 | 245 |
*/ |
236 |
function ckeditor_init() { |
|
237 |
drupal_add_css(drupal_get_path('module', 'ckeditor') . '/ckeditor.css'); |
|
246 |
function ckeditor_page_build(&$page) { |
|
247 |
// Add our CSS file that adds common needed classes, such as align-left, |
|
248 |
// align-right, underline, indent, etc. |
|
249 |
$page['page_bottom']['ckeditor']['#attached']['css'] = array( |
|
250 |
drupal_get_path('module', 'ckeditor') . '/css/ckeditor.css' => array( |
|
251 |
'every_page' => TRUE, |
|
252 |
), |
|
253 |
); |
|
238 | 254 |
} |
239 | 255 |
|
240 | 256 |
/** |
... | ... | |
404 | 420 |
default: |
405 | 421 |
case 'relative': |
406 | 422 |
if ($global_profile && isset($global_profile->settings['ckeditor_path'])) { |
423 |
// http:// OR https:// OR // |
|
424 |
if (preg_match("|^(http(s)?:)?//|i", $global_profile->settings['ckeditor_path'])) { |
|
425 |
return '<URL>'; |
|
426 |
} |
|
407 | 427 |
$cke_path = $global_profile->settings['ckeditor_path']; |
408 | 428 |
$cke_path = strtr($cke_path, array("%b" => ckeditor_base_path('relative'), "%m" => ckeditor_module_path('relative'), "%l" => ckeditor_library_path('relative'))); |
409 | 429 |
$cke_path = str_replace('\\', '/', $cke_path); |
... | ... | |
417 | 437 |
return $cke_static[$mode] = $global_profile->settings['ckeditor_local_path']; |
418 | 438 |
} |
419 | 439 |
if (isset($global_profile->settings['ckeditor_path'])) { |
440 |
// http:// OR https:// OR // |
|
441 |
if (preg_match("|^(http(s)?:)?//|i", $global_profile->settings['ckeditor_path'])) { |
|
442 |
return '<URL>'; |
|
443 |
} |
|
420 | 444 |
$cke_local_path = $global_profile->settings['ckeditor_path']; |
421 | 445 |
$cke_local_path = strtr($cke_local_path, array("%b" => ckeditor_base_path('local'), "%m" => ckeditor_module_path('local'), "%l" => ckeditor_library_path('local'))); |
422 | 446 |
return $cke_static[$mode] = $cke_local_path; |
... | ... | |
425 | 449 |
return $cke_static[$mode] = ckeditor_module_path('local') . '/ckeditor'; |
426 | 450 |
case 'url': |
427 | 451 |
if ($global_profile && isset($global_profile->settings['ckeditor_path'])) { |
428 |
$cke_path = $global_profile->settings['ckeditor_path']; |
|
429 |
$cke_path = strtr($cke_path, array("%m" => ckeditor_module_path('url'), "%l" => ckeditor_library_path('url'))); |
|
430 |
$cke_path = str_replace('\\', '/', $cke_path); |
|
431 |
$cke_path = str_replace('//', '/', $cke_path); |
|
432 |
//In D7 base path in URL mode is not needed, so we need to remove it with trailing slash (if exists) |
|
433 |
$cke_path = str_replace(array("%b/", "%b"), '', $cke_path); |
|
452 |
// http:// OR https:// OR // |
|
453 |
if (preg_match("|^(http(s)?:)?//|i", $global_profile->settings['ckeditor_path'])) { |
|
454 |
$cke_path = $global_profile->settings['ckeditor_path']; |
|
455 |
} |
|
456 |
else { |
|
457 |
$cke_path = $global_profile->settings['ckeditor_path']; |
|
458 |
$cke_path = strtr($cke_path, array("%m" => ckeditor_module_path('url'), "%l" => ckeditor_library_path('url'))); |
|
459 |
$cke_path = str_replace('\\', '/', $cke_path); |
|
460 |
$cke_path = str_replace('//', '/', $cke_path); |
|
461 |
//In D7 base path in URL mode is not needed, so we need to remove it with trailing slash (if exists) |
|
462 |
$cke_path = str_replace(array("%b/", "%b"), '', $cke_path); |
|
463 |
} |
|
434 | 464 |
return $cke_static[$mode] = $cke_path; |
435 | 465 |
} |
436 | 466 |
return $cke_static[$mode] = ckeditor_module_path('url') . '/ckeditor'; |
drupal7/sites/all/modules/ckeditor/css/ckeditor-rtl.css | ||
---|---|---|
1 |
/* Indent & Justify classes */
|
|
1 |
/* General RTL indentation & positioning classes */
|
|
2 | 2 |
|
3 | 3 |
.rteindent1 { |
4 | 4 |
margin-right: 40px; |
... | ... | |
31 | 31 |
.rteindent4[dir=ltr] { |
32 | 32 |
margin-left: 160px; |
33 | 33 |
margin-right: 0; |
34 |
} |
|
34 |
} |
drupal7/sites/all/modules/ckeditor/css/ckeditor.admin.css | ||
---|---|---|
1 |
/* Indent & Justify classes */
|
|
1 |
/* Administrative classes */
|
|
2 | 2 |
|
3 |
.rteindent1 { |
|
4 |
margin-left: 40px; |
|
5 |
} |
|
6 |
.rteindent2 { |
|
7 |
margin-left: 80px; |
|
8 |
} |
|
9 |
.rteindent3 { |
|
10 |
margin-left: 120px; |
|
11 |
} |
|
12 |
.rteindent4 { |
|
13 |
margin-left: 160px; |
|
14 |
} |
|
15 |
.rteleft { |
|
16 |
text-align: left; |
|
17 |
} |
|
18 |
.rteright { |
|
19 |
text-align: right; |
|
20 |
} |
|
21 |
.rtecenter { |
|
22 |
text-align: center; |
|
23 |
} |
|
24 |
.rtejustify { |
|
25 |
text-align: justify; |
|
26 |
} |
|
27 |
.ibimage_left { |
|
28 |
float: left; |
|
29 |
} |
|
30 |
.ibimage_right { |
|
31 |
float: right; |
|
32 |
} |
|
33 |
|
|
34 |
/* CKEditor padding in IE */ |
|
35 |
table.cke_editor fieldset { |
|
36 |
padding: 0 !important; |
|
37 |
} |
|
38 |
/* hack with ie and garland editing area size fix - [#733512] */ |
|
39 |
.cke_editor{ |
|
40 |
display: table !important; |
|
41 |
} |
|
42 |
.cke_editor,#ie#bug { |
|
43 |
display: inline-table !important; |
|
44 |
} |
|
45 |
/* Fix table border for Drupal's Seven theme - [#1020612] */ |
|
46 |
.cke_dialog tr td:last-child { |
|
47 |
border-right: 0; |
|
48 |
} |
|
49 |
|
|
50 |
/*toolbar Drag & Drop*/ |
|
3 |
/* Toolbar Drag & Drop */ |
|
51 | 4 |
form#ckeditor-admin-profile-form textarea#edit-toolbar { |
52 | 5 |
display: none; |
53 | 6 |
} |
... | ... | |
68 | 21 |
margin: 20px 0px 0px 0px; |
69 | 22 |
} |
70 | 23 |
div.sortableList div.sortableListDiv { |
71 |
height: 30px;
|
|
24 |
height: 34px;
|
|
72 | 25 |
margin-bottom: 3px; |
73 |
width: 900px;
|
|
26 |
width: 930px;
|
|
74 | 27 |
} |
75 | 28 |
div.sortableList div.sortableListDiv span.sortableListSpan { |
76 | 29 |
background-color: #F0F0EE; |
77 |
height: 30px;
|
|
30 |
height: 34px;
|
|
78 | 31 |
border-right: 1px dashed #CCC; |
79 | 32 |
display: block; |
80 | 33 |
} |
81 | 34 |
div.sortableList div.sortableListDiv span.sortableListSpan ul { |
82 |
width: 900px;
|
|
35 |
width: 930px;
|
|
83 | 36 |
white-space: nowrap; |
84 | 37 |
border: 1px solid #CCC; |
85 | 38 |
list-style: none; |
86 | 39 |
margin:0px; |
87 | 40 |
padding: 0px 0px 0px 1px; |
88 |
height: 30px;
|
|
41 |
height: 34px;
|
|
89 | 42 |
} |
90 | 43 |
div.sortableList div.sortableListDiv span.sortableListSpan ul li { |
91 | 44 |
list-style: none; |
92 | 45 |
cursor: move; |
93 | 46 |
height: 18px; |
94 | 47 |
min-width: 18px; |
95 |
padding: 2px;
|
|
48 |
padding: 4px;
|
|
96 | 49 |
} |
97 | 50 |
div.sortableList div.sortableListDiv span.sortableListSpan ul li.group { |
98 | 51 |
min-width: 5px; |
99 |
padding-left: 2px; |
|
52 |
padding-left: 4px; |
|
53 |
} |
|
54 |
div.sortableList div.sortableListDiv span.sortableListSpan ul li.spacer img { |
|
55 |
margin-bottom: 4px; |
|
100 | 56 |
} |
101 | 57 |
div.sortableList div.sortableListDiv span.sortableListSpan ul li img { |
102 | 58 |
border: 0; |
103 | 59 |
padding: 0; |
104 | 60 |
margin: 0 |
105 | 61 |
} |
62 |
fieldset#edit-appearance li.sortableItem img { |
|
63 |
max-height:24px; |
|
64 |
width:auto; |
|
65 |
} |
|
66 |
div.sortableList #Format img, div.sortableList #Font img, div.sortableList #Styles img, div.sortableList #FontSize img { |
|
67 |
max-height:30px !important; |
|
68 |
} |
|
69 |
div.sortableList #Format, div.sortableList #Font, div.sortableList #Styles, div.sortableList #FontSize { |
|
70 |
padding:0; |
|
71 |
} |
|
106 | 72 |
li.sortableItem { |
107 | 73 |
position: relative; |
108 | 74 |
float: left; |
... | ... | |
164 | 130 |
margin: 1em 0; |
165 | 131 |
overflow: auto; |
166 | 132 |
} |
167 |
/* end of toolbar Drag & Drop */ |
drupal7/sites/all/modules/ckeditor/css/ckeditor.css | ||
---|---|---|
1 |
/* General indentation & positioning classes */ |
|
2 |
|
|
3 |
.rteindent1 { |
|
4 |
margin-left: 40px; |
|
5 |
} |
|
6 |
.rteindent2 { |
|
7 |
margin-left: 80px; |
|
8 |
} |
|
9 |
.rteindent3 { |
|
10 |
margin-left: 120px; |
|
11 |
} |
|
12 |
.rteindent4 { |
|
13 |
margin-left: 160px; |
|
14 |
} |
|
15 |
.rteleft { |
|
16 |
text-align: left; |
|
17 |
} |
|
18 |
.rteright { |
|
19 |
text-align: right; |
|
20 |
} |
|
21 |
.rtecenter { |
|
22 |
text-align: center; |
|
23 |
} |
|
24 |
.rtejustify { |
|
25 |
text-align: justify; |
|
26 |
} |
|
27 |
.ibimage_left { |
|
28 |
float: left; |
|
29 |
} |
|
30 |
.ibimage_right { |
|
31 |
float: right; |
|
32 |
} |
drupal7/sites/all/modules/ckeditor/css/ckeditor.editor.css | ||
---|---|---|
1 |
/* Editor classes */ |
|
2 |
|
|
3 |
/* CKEditor padding in IE */ |
|
4 |
table.cke_editor fieldset { |
|
5 |
padding: 0 !important; |
|
6 |
} |
|
7 |
/* hack with ie and garland editing area size fix - [#733512] */ |
|
8 |
.cke_editor{ |
|
9 |
display: table !important; |
|
10 |
} |
|
11 |
.cke_editor,#ie#bug { |
|
12 |
display: inline-table !important; |
|
13 |
} |
|
14 |
/* Fix table border for Drupal's Seven theme - [#1020612] */ |
|
15 |
.cke_dialog tr td:last-child { |
|
16 |
border-right: 0; |
|
17 |
} |
|
18 |
/* Panels in IE11 [#2244835] */ |
|
19 |
.cke.cke_chrome { |
|
20 |
visibility: inherit; |
|
21 |
} |
|
22 |
.cke.cke_panel { |
|
23 |
visibility: visible; |
|
24 |
} |
Formats disponibles : Unified diff
Update CKEditor