Acerca de
The CKEditor 5 module provides a highly-accessible, highly-usable visual text editor and adds a toolbar to text fields. Users can use buttons to format content and to create semantically correct and valid HTML. The CKEditor module uses the framework provided by the Text Editor module. It requires JavaScript to be enabled in the browser. For more information, see the online documentation for the CKEditor 5 module and the CKEditor 5 website.
Usos
- Enabling CKEditor 5 for individual text formats
- CKEditor 5 has to be enabled and configured separately for individual text formats from the Text formats and editors page because the filter settings for each text format can be different. For more information, see the Text Editor help page and Filter help page.
- configurando la barra de herramientas
- When CKEditor 5 is chosen from the Text editor drop-down menu, its toolbar configuration is displayed. You can add and remove buttons from the Active toolbar by dragging and dropping them. Separators and rows can be added to organize the buttons.
- Filtering HTML content
- Unlike other text editors, plugin configuration determines the tags and attributes allowed in text formats using CKEditor 5. If using the Limit allowed HTML tags and correct faulty HTML filter, this filter's values will be automatically set based on enabled plugins and toolbar items.
- Cambiando entre texto formateado y código HTML
- If the Source button is available in the toolbar, users can click this button to disable the visual editor and edit the HTML source directly. After toggling back, the visual editor uses the HTML tags allowed via plugin configuration (and not explicity disallowed by filters) to format the text. Tags not enabled via plugin configuration will be stripped out of the HTML source when the user toggles back to the text editor.
- Developing CKEditor 5 plugins in Drupal
- See the online documentation for detailed information on developing CKEditor 5 plugins for use in Drupal.
- Características de accesibilidad
- The built in WYSIWYG editor (CKEditor 5) comes with a number of accessibility features. CKEditor 5 comes with built in keyboard shortcuts, which can be beneficial for both power users and keyboard only users.
- Generando contenido accesible
- HTML tables can be created with table headers and caption/summary elements.
- Alt text is required by default on images added through CKEditor (note that this can be overridden).
- Semantic HTML5 figure/figcaption are available to add captions to images.
- To support multilingual page content, CKEditor 5 can be configured to include a language button in the toolbar.
Migrating an Existing Text Format to CKEditor 5
When switching an existing text format to use CKEditor 5, an automatic process is initiated that helps text formats switching to CKEditor 5 from CKEditor 4 (or no text editor) to do so with minimal effort and zero data loss.
This process is designed for there to be no data loss risk in switching to CKEditor 5. However some of your editor's functionality may not be 100% equivalent to what was available previously. In most cases, these changes are minimal. After the process completes, status and/or warning messages will summarize any changes that occurred, and more detailed information will be available in the site's logs.
CKEditor 5 will attempt to enable plugins that provide equivalent toolbar items to those used prior to switching to CKEditor 5. All core CKEditor 4 plugins and many popular contrib plugins already have CKEditor 5 equivalents. In some cases, functionality that required contrib modules is now built into CKEditor 5. In instances where a plugin does not have an equivalent, no data loss will occur but elements previously provided via the plugin may need to be added manually as HTML via source editing.
Additional migration considerations for text formats with restricted HTML
- The “Allowed HTML tags" field in the “Limit allowed HTML tags and correct Faulty HTML" filter is now read-only
- This field accurately represents the tags/attributes allowed by a text format, but the allowed tags are based on which plugins are enabled and how they are configured. For example, enabling the Underline plugin adds the <u> tag to “Allowed HTML tags".
- CKEditor 5 requires the <p> and <br > tags to achieve basic functionality. They will be automatically added to “Allowed HTML tags" on formats that previously did not allow them.
- Tags/attributes that are not explicitly supported by any plugin are supported by Source Editing
- When a necessary tag/attribute is not directly supported by an available plugin, the "Source Editing" plugin is enabled. This plugin is typically used for by passing the CKEditor 5 UI and editing contents as HTML source. In the settings for Source Editing, tags/attributes that aren't available via other plugins are added to Source Editing's "Manually editable HTML tags" setting so they are supported by the text format.