Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module provides APIs to convert Drupal content entities, such as nodes, paragraphs, and files, into plain text. It's useful for tasks like indexing content for search engines, improving SEO, or generating JSON-LD data.

This suite is primarily a set of APIs and tools to improve the developer experience.

This module provides a number of utility and helper APIs for developers to transform content into plain text.

Use Entity to Text if

  • You need to get plain-text content of Nodes for Indexing content into a Search Engine (Solr, Elasticsearch, ...).
  • You want to get plain-text of Nodes Paragraphs for SEO or JSON-LD.
  • You need to transform "Node entity" field(s) into plain-text content.
  • You need to transform "Paragraphs entity" field(s) into plain-text content.
  • You need to transform "File entity" into plain-text through Tika.

Usage

See code example for complete usage of Entity to Text.

Dependencies

The main module requires ezyang/htmlpurifier

  • The submodule entity_to_text_tika requires the library vaites/php-apache-tika.
  • The submodule entity_to_text_paragraphs requires the library drupal/paragraphs.

Which version should I use?

Drupal Core Entity to Text 8.x unsupported 9.x 1.0.x 10.x 1.1.x 11.x 1.1.x

Getting Started

We highly recommend you to install the module using `composer`.

$ composer require drupal/entity_to_text

Supporting organizations

This project is sponsored by Antistatique.
We are a Swiss Web Agency, Visit us at www.antistatique.net or Contact us.

Credits

Thank you to all our wonderful contributors.
Entity to Text is currently maintained by Kevin Wenger.

Activity

Total releases
9
First release
Feb 2025
Latest release
1 month ago
Releases (12 mo)
7 ▲ from 2
Maintenance
Active

Release Timeline

Releases

Version Type Release date
1.3.2 Stable Jun 8, 2026
1.3.1 Stable Feb 25, 2026
1.3.0 Stable Nov 7, 2025
1.3.x-dev Dev Nov 7, 2025
1.2.0 Stable Aug 11, 2025
1.2.x-dev Dev Aug 11, 2025
1.1.x-dev Dev Jul 28, 2025
1.1.0 Stable Feb 25, 2025
1.0.0 Stable Feb 25, 2025