meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:ckeditor [2023/03/03 09:05] – [config.php] duncanc | plugin: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 1: | Line 1: | ||
+ | ====== CKEditor ====== | ||
+ | ---- plugin ---- | ||
+ | |||
+ | description: | ||
+ | author | ||
+ | type : editor | ||
+ | compatible : 3.x | ||
+ | tags : editor | ||
+ | |||
+ | sourcerepo : https:// | ||
+ | |||
+ | ---- | ||
+ | |||
+ | This plugin provides CKEditor 4 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:// | ||
+ | |||
+ | ===== Installation ===== | ||
+ | |||
+ | This plugin is now included in phplist, but see the README file on the GitHub page https:// | ||
+ | |||
+ | ===== Configuration ===== | ||
+ | |||
+ | ==== config.php ==== | ||
+ | |||
+ | The UPLOADIMAGES_DIR value in config.php must be set to the location of a directory where KCFinder can store uploaded images. The directory must be writable by the web server. Note that the value is relative to the web root and must not contain a leading '/' | ||
+ | |||
+ | <code php> | ||
+ | |||
+ | If the UPLOADIMAGES_DIR value in config.php is set to '' | ||
+ | |||
+ | The upload directory will be shared by all admins. You can give each admin their own private directory using | ||
+ | |||
+ | <code php> | ||
+ | |||
+ | KCFinder will use a subdirectory of UPLOADIMAGES_DIR named after the admin login id (1, 2, 3 etc.), creating the subdirectory on first-use. The subdirectory is private to the admin, and there is no sharing of image files. | ||
+ | |||
+ | === SELINUX configuration for images dir === | ||
+ | |||
+ | To make this work with selinux enforced on centos7 with apache and phplist installed in ''/ | ||
+ | |||
+ | Edit config.php adding the following to the end of the file; | ||
+ | |||
+ | '' | ||
+ | |||
+ | <code bash>cd lists | ||
+ | mkdir uploadimages uploadimages/ | ||
+ | chown -R apache: | ||
+ | semanage fcontext -a -t httpd_sys_rw_content_t / | ||
+ | chcon -Rv --type=httpd_sys_rw_content_t / | ||
+ | </ | ||
+ | ==== Settings page ==== | ||
+ | |||
+ | The Settings page has a CKEditor group where you can configure the plugin. | ||
+ | |||
+ | * The URL of ckeditor.js | ||
+ | * The path to a custom configuration file. This is the path from the web root. | ||
+ | * You can select to generate a full HTML page when editing a message. The message will then include ''< | ||
+ | * Whether to disallow javascript. The default setting is '' | ||
+ | * If using the Dressprow theme, the width and height of the editor window can be specified. | ||
+ | * The path to KCFinder. This is the path from the web root or a relative path from the '' | ||
+ | * 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 '' | ||
+ | * | ||
+ | |||
+ | ===== Custom configuration ===== | ||
+ | |||
+ | Other settings for the editor can be placed in a custom configuration file. This file needs to be within the web root and its web path specified on the Settings page, e.g. ''/ | ||
+ | |||
+ | See [[https:// | ||
+ | |||
+ | ===== Styles ===== | ||
+ | |||
+ | Style definitions can be specified in the custom configuration file, and they will then appear in the Styles drop-down list when editing a message. Additionally, | ||
+ | |||
+ | See [[https:// | ||
+ | |||
+ | ===== Location of CKEditor ===== | ||
+ | |||
+ | Starting in version 2.1.0 of the plugin CKEditor is loaded from its Content Delivery Network. Earlier versions of the plugin included a copy of CKEditor but that is no longer the case. | ||
+ | |||
+ | If you want to customise CKEditor, such as by adding further plugins to it, then you can install a local copy by downloading a version from https:// | ||
+ | |||
+ | Expand the zip file then copy the ckeditor directory to the root directory of your web site. | ||
+ | |||
+ | You must then enter the URL for ckeditor.js in the CKEditor group on the Settings page. For example, if you installed CKEditor in the directory '' | ||
+ | |||
+ | At present (July 2024) version 4.20.2 is the last one that does not display a pop-up message regarding being insecure and recommending upgrading. | ||
+ | ===== Upgrade CKEditor ===== | ||
+ | |||
+ | The plugin will not automatically upgrade to a new release of the CKEditor package. To see whether there is a later release, or to use either the Basic or the Standard package, visit the CKEditor CDN section [[https:// | ||
+ | |||
+ | ===== Upgrade KCFinder ===== | ||
+ | |||
+ | |||
+ | The plugin includes KCFinder 3.20 but the KCFinder package is no longer developed or supported. | ||
+ | |||
+ | ===== Upgrade from phplist 2.10.x with FCKEditor ===== | ||
+ | |||
+ | In phplist 2.10 the FCKIMAGES_DIR value in config.php defines the directory into which images will be uploaded. The value is relative to the phplist root directory. | ||
+ | |||
+ | In phplist 3.x a different value, UPLOADIMAGES_DIR, | ||
+ | |||
+ | ===== Issues ===== | ||
+ | |||
+ | ==== Image browsing is not available because directory "/ | ||
+ | |||
+ | This message means that there is probably an error in the value specified for '' | ||
+ | |||
+ | For example, on a server using CPanel, using the default value of '' | ||
+ | |||
+ | Alternatively, | ||
+ | |||
+ | There can be some cases when the plugin displays this message but the directory does exist. This can happen when the web server uses a non-standard DOCUMENT_ROOT or uses symbolic file links. If this is the case then you can specify the actual file system path for the upload directory in the CKEditor group on the Settings page | ||
+ | |||
+ | |||
+ | {{ : | ||
+ | ==== Warning, Unknown failure ==== | ||
+ | |||
+ | This message can be displayed when a symbolic link is used for the file upload directory, which triggers a bug in the KCFinder file browser. Version 2.1.3 of this plugin has some processing to try to work around this problem, so ensure that you are using version 2.1.3 or later. You can verify this on the Manage Plugins page. | ||
+ | |||
+ | If the error still occurs then you can try setting the file system path for the upload directory explicitly in the CKEditor group on the Settings page | ||
+ | |||
+ | {{ : | ||
+ | ==== You don’t have permissions to browse server ==== | ||
+ | |||
+ | If you get the message '' | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | See the [[http:// | ||
+ | |||
+ | To avoid this problem you should use the default session handling with phplist. In particular do not use the phplist option to store sessions in a database table, as the session will not be accessible to KCFinder. | ||
+ | |||
+ | |||
+ | If you cannot resolve the problem then a work-around is to change one line in the KCFinder config file, setting '' | ||
+ | |||
+ | |||
+ | ====== Support ====== | ||
+ | Please raise any questions or problems in the user forum https:// |