This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
plugin:ckeditor [2020/08/01 10:12] duncanc [config.php] |
plugin:ckeditor [2023/05/14 11:24] (current) duncanc [Custom configuration] |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== CKEditor ====== | ||
+ | ---- plugin ---- | ||
+ | description: | ||
+ | author | ||
+ | type : editor | ||
+ | compatible : 3.x | ||
+ | tags : editor | ||
+ | |||
+ | sourcerepo : https:// | ||
+ | |||
+ | ---- | ||
+ | |||
+ | This plugin provides CKEditor for editing messages and templates. It also integrates the KCFinder file manager to provide file uploading and browsing. | ||
+ | |||
+ | ===== 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 website path to a custom configuration file. | ||
+ | * The width and height of the editor window. | ||
+ | * You can select to generate a full HTML page when editing a template. The template will then include ''< | ||
+ | * | ||
+ | * The website path to KCFinder. | ||
+ | * 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. 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 '' | ||
+ | |||
+ | ===== 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 '' | ||
+ | |||
+ | ==== 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 ('' | ||
+ | |||
+ | 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 ====== | ||
+ | Please raise any questions or problems in the user forum https:// |