HTML Field Formatter
This module allows you to display the content of text and string fields as raw HTML. It's useful when you have plain text fields containing basic HTML markup that you want to render directly. Be cautious, as this module outputs HTML unfiltered, so it's important to restrict access to trusted users to prevent potential security risks like XSS.
This is a very simple module that enables an HTML field format for text and string fields.
Useful for plain text fields that might have basic html and needs to be rendered as such.
Provides a simple solution for many different use cases.
By default, this module outputs the HTML code of the field unfiltered.
It is therefore the responsibility of the site operator to take appropriate
measures, e.g. against XSS. Access should be restricted to trusted roles.
Requirements
No special requirements at this time.
Install
It is recommended to install via composer. See below for commands:
composer require drupal/html_field_formatter
drush en html_field_formatter
Configuration
- Goto Structure -> Content Types and select a content type to change.
- Goto "Manage Display" page and change "Format" on desired field to "HTML".
- Configure any formatting settings as needed.
- Save changes.
- Now field should be formatted as HTML.