6.16. Configuring Text Formats and Editors

Last updated on
14 April 2025

Goal

Add a horizontal rule tag to the Basic HTML text format, and a corresponding button to its editor configuration.

Site prerequisites

  • The core Filter, Editor, and CKEditor modules must be installed. They are installed on your site when you install with the core Standard installation profile.
  • The Basic HTML text format must exist. This is created on your site when you install with the core Standard installation profile.

Steps

  1. In the Manage administrative menu, navigate to Configuration > Content authoring > Text formats and editors (admin/config/content/formats). The Text formats and editors page appears. Note that the names of the text formats that came with your installation profile are shown in English on this page; see Section 2.7, “Concept: User Interface, Configuration, and Content translation” for an explanation.
  2. Click Configure for the Basic HTML text format. The Basic HTML page appears.
  3. Note that CKEditor is selected in the Text editor field. This allows you to configure the editor’s toolbar.
  4. Drag the horizontal line button from Available buttons to the Active toolbar. Toolbar items can be visually grouped together using a vertical divider. As an alternative to dragging, you can tab to select buttons and then move them using keyboard arrow keys.

    Configuring the editor

  5. Note that you can change the Filter processing order.
  6. Under Filter settings > Limit allowed HTML tags and correct faulty HTML, in the field Allowed HTML tags, verify that <hr> is present (adding its editor button will automatically update the allowed tags).

    Configuring the HTML tags

  7. Click Save configuration. You will be taken back to the Text formats and editors page. A message will be displayed saying that the text format has been updated.

    Confirmation message for text format configuration

Expand your understanding

If you do not see the effect of these changes in your site, you might need to clear the cache. See Section 12.2, “Clearing the Cache”.

Videos

Configuring Text Formats and Editors

Attributions

Written and edited by Boris Doesborg, and Joe Shindelar at Drupalize.Me.

 

This page is generated from AsciiDoc source from the User Guide. To propose a change, edit the source and attach the file to a new issue in the User Guide project. PDF and e-book formats are available on the User Guide project page.

Source file: structure-text-format-config.asciidoc

Help improve this page

Page status: No known problems

You can: