From 76732ced4f6cf86f45f0d4bc86909d85f9c89144 Mon Sep 17 00:00:00 2001 From: Yuri Salimovskiy Date: Mon, 6 Nov 2023 15:59:07 +0200 Subject: [PATCH] redactorx update --- docs/_images/rte-buttons.png | Bin 0 -> 8568 bytes docs/add-ons/rte.md | 68 +++++++---------------- docs/development/models/channel-field.md | 2 +- 3 files changed, 21 insertions(+), 49 deletions(-) create mode 100644 docs/_images/rte-buttons.png diff --git a/docs/_images/rte-buttons.png b/docs/_images/rte-buttons.png new file mode 100644 index 0000000000000000000000000000000000000000..c75b79a9d2a346a5e36bb4814cc7e279538ee4af GIT binary patch literal 8568 zcmchdcRZW#+xPh@rCMr~8lh@yPpn@%82b<6!6ipkJyjBtx&-R8r{u(ADtGP2 zUL+(mJr_^X0k<-H5)!U!AazyKm)6*M+C;|5oXfj;kHqTeBO0n!6U=xph_0cZj?wf{ zT;{x+R31N5ZESf2YzpZ9qKf5-%An*Iuoq7M6=?{%*PD2soA(_#o#*{B^?MOkh}3%r zm&QNSS9?|8FaoaClZ_mYL=B}NVJ3ni6^gWT;X%EJ4P0#lT#_L289|Gy; zgCRV(Z{IFtx2@MwS65H9(>=Oq@QfSeprfNRiWft16Pt&`_yUQo>T><|2^VGq8Qa8G zI?T-!r9Z|J`bV?PHHn!r(%J-9M;#fz3bue8UHqXcVba3Gd}?0W^ki}BHugMu0t-1B zdht^~q(c{Lu&^CuT_>1%$PVLo^;X&G{}3z}u^t^2Rc3aRC-AbvY86F!+a`^Fzz#w@ z;M~eHK|!zWtYOdM6pTMk?ZKZRpq?m~G;JRF?_avOJ-^$9NIwNA%!mJCOXq>j{O~61 z9e>YsoMtRNtv!Z8I~Vi(;9uAMV=rc>$eYqmc4zJLbb1G`T{@`n4*xxQx#tS< zlUKV#5XH$pZsHi|cHx;MetDEay`I@Z!(;oozYv5{dAU(Ad(*0N_I(HpaIP4h?z3%y zg$7J6d)o!6Ei>+-UpQDcQ)DK{ROPI+OXCK67EUp%J@q9BBazC1^=x6hm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.md index 00d258a07..dd010a1a7 100755 --- a/docs/add-ons/rte.md +++ b/docs/add-ons/rte.md @@ -11,7 +11,9 @@ [TOC] -ExpressionEngine's built-in Rich Text Editor (RTE) is a fieldtype that can be used for entry editing in the Control Panel as well as frontend Channel Forms. It is offering [CKEditor 5](https://ckeditor.com/ckeditor-5/) and [Redactor](https://imperavi.com/redactor/) as editing engine. +ExpressionEngine's built-in Rich Text Editor (RTE) is a fieldtype that can be used for entry editing in the Control Panel as well as frontend Channel Forms. It is offering [CKEditor 5](https://ckeditor.com/ckeditor-5/) and [RedactorX](https://imperavi.com/redactorx/) as editing engine. + +Additionally, [Redactor 3](https://imperavi.com/redactor/) is available as a legacy option, but it is not recommended for new projects. NOTE: **Note:** If you're looking for how to use RTE fields in your channel entries loops, you should look at [the RTE field variable usage documentation](fieldtypes/rte.md) in the channel fields documentation. @@ -24,14 +26,14 @@ Tool Sets are essentially pre-created configurations that can be used by particu Initially RTE installs 4 tool sets: - **CKEditor Basic:** is based on CKEditor and has buttons for bold, italic, underline, link, and ordered/unordered lists - **CKEditor Full:** offers full set of CKEditor features -- **Redactor Basic:** is based on Redactor and has buttons for bold, italic, underline, link, and ordered/unordered lists -- **Redactor Full:** offers full set of Redactor features +- **RedactorX Basic:** is based on RedactorX and has buttons for bold, italic, underline, link, and ordered/unordered lists +- **RedactorX Full:** offers full set of RedactorX features ### Creating a Tool Set - Click the **Create New** button and the tool set creation form will appear. - Enter a tool set name. -- Select tool set type (CKEditor or Redactor) +- Select tool set type (CKEditor, RedactorX or Redactor) - Select the toolbar buttons and plugins you wish to have in your new tool set (or use the [Advanced Configuration option](#advanced-configuration)). - Click **Save Tool Set** to save your changes. @@ -49,7 +51,7 @@ Initially RTE installs 4 tool sets: #### Editor Type -Rich Text Editor comes with [CKEditor](https://ckeditor.com/) v5 and [Redactor](https://imperavi.com/redactor/) v3 support. Both are great, pick the one that fits your needs best. +Rich Text Editor comes with [CKEditor](https://ckeditor.com/) v5 and [RedactorX](https://imperavi.com/redactorx/). Both are great, pick the one that fits your needs best. [Redactor 3](https://imperavi.com/redactor/) has been deprecated, but is also available. #### Upload Directory @@ -59,45 +61,15 @@ The file management features in RTE field can be allowed to access all upload di Choose between "Left to right" and "Right to left" -#### Tool Set Buttons - -The following are the buttons that can be enabled in tool set to manipulate the data within an RTE field. - -
    -
  • HTML (Redactor only)
  • -
  • Bold
  • -
  • Italic
  • -
  • Strikethrough / Deleted
  • -
  • Underline
  • -
  • Subscript
  • -
  • Superscript
  • -
  • Block quote
  • -
  • Code
  • -
  • Code block
  • -
  • Heading / Format
  • -
  • Remove formatting (CKEditor only)
  • -
  • Style (Redactor only)
  • -
  • Properties (Redactor only)
  • -
  • Undo
  • -
  • Redo
  • -
  • Numbered list
  • -
  • Bulleted list
  • -
  • Decrease indent
  • -
  • Increase indent
  • -
  • Link
  • -
  • Image / File Browser
  • -
  • Table
  • -
  • Media / Video
  • -
  • Embed HTML / Widget
  • -
  • Align (left / right / center)
  • -
  • Justify
  • -
  • Horizontal line
  • -
  • Special characters
  • -
  • "Read More" separator
  • -
  • Font color / background
  • -
  • Fullscreen (Redactor only)
  • -
  • HTML Source editing
  • -
+#### Customize the Toolbar + +![RTE buttons](_images/rte-buttons.png) + +The exact set of buttons that are available is specific to the editor type selected. CKEditor and Redactor have a single toolbar, while RedactorX has multiple toolbars, each configured separately. + +The buttons / plugins that are enabled are displayed in the order they will appear in the toolbar. You can drag and drop the buttons to change their order. + +The disabled buttons / plugins are displayed in grey. #### Custom Stylesheet CSS template with styles to be applied to fields using this tool set. All styles will be automatically prefixed with toolset class, which means that the template should hold rather generic styles for the elements. @@ -108,7 +80,7 @@ The minimal height for the field in pixels #### Maximal height -The maximum height for the field in pixels (Redactor only). +The maximum height for the field in pixels (RedactorX / Redactor only). #### Limit characters @@ -128,7 +100,7 @@ WARN: **Advanced users only.** Please be careful with using this feature and che Initially the field is loaded with the saved configuration of tool set being edited. -Consult [Redactor Docs](https://imperavi.com/redactor/docs/settings/) or [CKEditor Docs](https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/configuration.html) for the list of properties. Note that not all features are supported by the ExpressionEngine implementation. +Consult [RedactorX Docs](https://imperavi.com/redactorx/docs/settings/), [Redactor Docs](https://imperavi.com/redactor/docs/settings/) or [CKEDitor Docs](https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/configuration.html) for the list of properties. Note that not all features are supported by the ExpressionEngine implementation. #### Extra JavaScript JavaScript template to be included with fields using this tool set. Typically used to include extra plugins when using advanced configuration with Redactor. @@ -156,9 +128,9 @@ NOTE: **Note:** If using the [Multiple Site Manager](msm/overview.md), this pref ## Custom plugins -### Redactor +### RedactorX -When using Redactor, the javascript for the plugin can be placed in the template, which then needs to be selected in "Extra JavaScript" field for the tool set. +When using RedactorX or Redactor, the javascript for the plugin can be placed in the template, which then needs to be selected in "Extra JavaScript" field for the tool set. Then enable extended configuration, add the plugin name to list of plugins and provide plugin config if necessary. If the plugin needs extra styling, it can be placed in CSS Templates selected in "Custom Stylesheet" field for the tool set. If the CSS is targeting buttons, the selectors need to be prefixed with `.redactor-toolbar`. diff --git a/docs/development/models/channel-field.md b/docs/development/models/channel-field.md index b932a00fb..439cae71b 100644 --- a/docs/development/models/channel-field.md +++ b/docs/development/models/channel-field.md @@ -86,7 +86,7 @@ The property `field_settings` consists in an array of settings that depend on th | relationship | `order_field`, `order_dir` | enum[title,entry_date] , enum[asc,desc] | Default ordering of entries | | relationship | `display_entry_id` | enum[y,n] | | | relationship | `allow_multiple` | enum[y,n] | | -| Rich text editor | `toolset_id` | integer | see Rich Text Editor addon for details, for a standard installation: 1 CKEditor Basic, 2 CKEditor Full, 3 Redactor Basic, 4 Redactor Full | +| Rich text editor | `toolset_id` | integer | see Rich Text Editor addon for details, for a standard installation: 1 CKEditor Basic, 2 CKEditor Full, 3 RedactorX Basic, 4 RedactorX Full | | Rich text editor | `defer` | enum[y,n] | Defer Editor initialization | | Rich text editor, Textarea | `db_column_type` | enum[text,mediumtext]| Column type in database: TEXT(64Kb) MEDIUMTEXT(16Mb) | | Rich text editor | `field_wide` | bool | default true, full width |