meta data for this page
  •  

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:ckeditor [2024/07/06 08:09] – [Location of CKEditor] duncancplugin:ckeditor [2025/02/14 17:45] (current) – [Only a template or a message can be edited as a full HTML page, not both. This message will use only limited HTML.] duncanc
Line 13: Line 13:
 ---- ----
  
-This plugin provides CKEditor for editing messages and templates. It also integrates the KCFinder file manager to provide file uploading and browsing.+This plugin provides CKEditor for editing messages and templates. It also integrates the KCFinder file manager to provide file uploading and browsing. 
 + 
 +Both CKEditor 4 and KCFinder are "end of life", which means they do not receive any code fixes or security updates. The plugin uses the last freely available version of CKEditor 4, version 4.22.1. There is a paid-for version that does have security patches, see [[https://ckeditor.com/ckeditor-4/download/]]
  
 ===== Installation ===== ===== Installation =====
Line 53: Line 55:
 The Settings page has a CKEditor group where you can configure the plugin. The Settings page has a CKEditor group where you can configure the plugin.
  
-  *     The URL of ckeditor.js +  * The URL of ckeditor.js 
-  *     The website path to a custom configuration file. +  * The path to a custom configuration file. This is the path from the web root
-  *     The width and height of the editor window+  * You can select to generate a full HTML page when editing a message. The message will then include ''<html>'', ''<head>'' and ''<body>'' elements. This setting defaults to ''No''. The plugin will always enable this setting for CKEditor when editing a template
-  *     You can select to generate a full HTML page when editing a template. The template will then include ''<html>'', ''<head>'' and ''<body>'' elements. This setting defaults to ''Yes''+  * Whether to disallow javascriptThe default setting is ''Yes'' in which case ''<script>'' elements, ''onclick'' and similar attributes, and ''<iframe>'' elements will be removed by CKEditorThis helps to reduce the effect of editing malicious HTML. 
-  *     Similarly you can select to generate a full HTML page when editing a messageThis is useful only when you do not use templates, otherwise the template and the message will both contain ''<html>'', ''<head>'' and ''<body>'' elements. The default value is ''No''. If this field is set to ''Yes'' then it is ignored if ''Allow templates to be edited as full HTML pages'' is also set to ''Yes''+  * If using the Dressprow theme, the width and height of the editor window can be specified
-  *     The website path to KCFinder. +  * The path to KCFinder. This is the path from the web root or a relative path from the ''admin'' directory
-  *     In some web server configurations the plugin will not be able to correctly derive the file system path to the upload image directory from the value of ''%%UPLOADIMAGES_DIR%%''. The plugin will show a message similar to this \\ ''Image browsing is not available because directory "/xxx/xxx" does not exist or is not writeable''. \\ If the file system path in the message is wrong but the value of ''%%UPLOADIMAGES_DIR%%'' is correct, then you can enter the actual file system path that should be used.+  * In some web server configurations the plugin will not be able to correctly derive the file system path to the upload image directory from the value of ''%%UPLOADIMAGES_DIR%%''. The plugin will show a message similar to this \\ ''Image browsing is not available because directory "/xxx/xxx" does not exist or is not writeable''. \\ If the file system path in the message is wrong but the value of ''%%UPLOADIMAGES_DIR%%'' is correct, then you can enter the actual file system path that should be used.
   *     KCFinder will create sub-directories within the image upload directory to store images, flash files and other files. If you need to then you can change the name of a sub-directory from the default value.   *     KCFinder will create sub-directories within the image upload directory to store images, flash files and other files. If you need to then you can change the name of a sub-directory from the default value.
  
Line 134: Line 136:
 If you cannot resolve the problem then a work-around is to change one line in the KCFinder config file, setting ''disabled'' to ''false'', as explained in the [[http://kcfinder.sunhater.com/secure#access|KCFinder documentation]]. If you cannot resolve the problem then a work-around is to change one line in the KCFinder config file, setting ''disabled'' to ''false'', as explained in the [[http://kcfinder.sunhater.com/secure#access|KCFinder documentation]].
  
-==== Only a template or a message can be edited as a full HTML page, not both. This message will use only limited HTML. ==== 
- 
-By default, CKEditor allows only a limited set of HTML elements to be used. If you want it to generate a full HTML page, including the structural elements (''head'', ''body'' etc), then one of the settings "Allow templates to be edited as full HTML pages" or "Allow messages to be edited as full HTML pages" needs to be enabled in the CKEditor section on the Settings page. 
- 
-When one of those settings is enabled, CKEditor will ensure that the HTML structural elements are present, even if not entered directly. This means that it is not sensible to edit both templates and messages as full HTML pages because both will include structural elements leading to badly-formed HTML when a template includes a message using the [CONTENT] placeholder. 
- 
-If both of those settings are enabled then the one for templates takes precedence, and CKEditor will allow only limited HTML when editing a message. 
  
-If you want to create only full page HTML messages and do not use templates then set "Allow templates ..." to No and "Allow messages ..." to Yes. 
 ====== Support ====== ====== Support ======
 Please raise any questions or problems in the user forum https://discuss.phplist.org/ Please raise any questions or problems in the user forum https://discuss.phplist.org/