Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Field Longtext Pager

7 sites No security coverage Drupal 10–11
View on drupal.org

This module allows you to break down long text fields into multiple, easily navigable pages. It intelligently handles complex HTML and offers features like an index, estimated reading time, and smooth Ajax paging.

This module provides a field formatter for splitting large longtext field content into more readable, indexed sub-pages as defined by pagebreaks, or a specific number of characters, words, or HTML blocks.

It also provides additional optional display features:

  • Pager index field
  • Estimated reading time field
  • Ajax paging

Requirements

  • Drupal 10, 11, or 12.

Recommended Modules

Installation

  1. Install as you would normally install a contributed Drupal module.
    composer require drupal/field_longtext_pager

To set module default settings visit:
<YOUR-SITE-URL>/admin/config/content/field_longtext_pager

You must ensure that your text formats and editors allow your page break placeholder.

The default example is:

<!--pagebreak-->

There are CKEditor plugins available to enable manual pagebreak insertion.

To enable paging on your field, visit the "Manage display" options in your entity field settings:
/admin/structure/types/manage/<ENTITY-ID>/display

Select the "Field pager" format option and choose your desired settings.

Ajax pager results currently use the "Full page" view to return results, falling back to the "Default" view when not found, which is often the case with entities such as comments.

The pager IDs are automatically incremented from the setting defined in the field options when multiple entities using paged fields are displayed on the same page. Reserve your highest pager ID settings for your primary fields in this scenario.

Technical Description

The algorithms are designed to split complicated HTML markup smartly. For example, it safely takes this:

<div class="text-important">
  <p class="info">
  Long content paragraph... 
<!--pagebreak-->
  Continuation of long content paragraph.
  </p>
  <ul class="text-note">
    <li>List #1</li>
    <li>Long list #2...
<!--pagebreak-->
    Continuation of long list #2</li>
    <li>List #3</li>
  </ul>
</div>

And cleanly splits it into this:

<div class="text-important">
  <p class="info">
  Long content paragraph... 
  </p>
</div>
------------Page 1------------
<div class="text-important">
  <p class="info">
  Continuation of long content paragraph.
  </p>
  <ul class="text-note">
    <li>List #1</li>
    <li>Long list #2...</li>
  </ul>
</div>
------------Page 2------------
<div class="text-important">
  <ul class="text-note">
    <li>Continuation of long list #2</li>
    <li>List #3</li>
  </ul>
</div>
------------Page 3------------

Maintainers

  • Dan Greenman - Freelance full-stack developer for hire.
    dangreenman

Commission your wildest Open Source software dreams.
See: Portfolio

Support This Project

If you find this module useful and would like to support its continued development, please consider making a donation. Your contributions help cover server costs, fund new features, and allow me to dedicate more time to maintaining this open-source project.

Donations are accepted in the following cryptocurrencies:

Coin Network Address Bitcoin BTC Mainnet bc1qwtnf888phavjuulj5y6ryvcgpyscckzt5gfu5p Monero XMR Mainnet 44KTVNFzSmC12srxKgxvCEbmUXSzjNmT1NAHRpF9tuhvCDMpsimTZerAxPr4pNrtT7EjqN45WKerrAh1K9UgKayR9ogksYm ZCash ZEC Mainnet t1g1zSTxGBtQJcQtdum52tXd2bBp8WkrbkG

Note: Network fees may vary depending on the cryptocurrency and current network congestion. Please ensure your donation amount accounts for these fees to avoid delays or failed transactions.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Jun 2025
Latest release
2 months ago
Releases (12 mo)
2
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
2.1.1 Stable 10–11 Jun 27, 2026
2.1.0 Stable 10–11 Jun 23, 2026
2.0.x-dev Dev 8–11 Jun 1, 2025
2.1.x-dev Dev 10–11 Jun 1, 2025