Last updated December 17, 2019


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

Configuring Text Formats and Editors

  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 rule button from Available buttons to Tools under Active toolbar. You may need to click the Show group names link to see the Tools group name.

    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, add <hr> to what is already present.

    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”.