Using Text Formats

Text formats determine the html allowed in your formatted text, and how it will be displayed.

Text formats are a configurable set of filters, which are plugins that format entered text. For example, limiting HTML.

Text formats can optionally use a text editor, and can configure available plugins. For example, you can add additional buttons to CKEditor.

Standard Installation

The standard install profile includes these text formats.

  • Basic HTML
    • Main content editor
  • Full HTML
    • Admin only content editor with enhanced features
  • Restricted HTML
    • Strictly limited text
Image
Drupal standard install profile text formats

Allowing Full HTML has some caveats.

A smart user could enter custom html and a <style> tag to totally customize their content.

However, custom markup in content is difficult to account for, and changing theme css could break it.

Admins may want powerful features like embedding videos. But you may want to restrict things for less privileged users.

That's why Basic HTML is provided. You can customize the options and assign allowed roles to allow or restrict features.

Restricted HTML has even more limits than basic, and does not provide an editor.

Editor config

The default editor is CKEditor5, which you can configure at Configuration > Content authoring > Text formats and editors.

Tags
Content
Modules