Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Trash 3.0.33 Minor update available for module trash (3.0.33). EOL Warning: Drupal 11.0 has reached end of life and no longer receives security updates. Usage Milestone: Focal Point Module focal_point crossed 1,000 active installs. Release: UI Patterns (SDC in Drupal UI) 2.0.20 Minor update available for module ui_patterns (2.0.20). Release: Trash 3.1.0-rc1 First release candidate for module trash (3.1.0-rc1). Release: Country 2.2.0 Minor update available for module country (2.2.0). Usage Milestone: Ultimate Cron Module ultimate_cron crossed 1,000 active installs. Usage Milestone: Easy Breadcrumb Module easy_breadcrumb crossed 1,000 active installs. Usage Milestone: Config Filter Module config_filter crossed 1,000 active installs. Usage Milestone: Blog Module blog crossed 1,000 active installs.

This module allows you to display and syntax-highlight text files directly within Drupal. It uses Prism.js to provide customizable syntax highlighting for various file types.

Overview

The Text File Viewer module allows you to display and syntax-highlight text files directly in Drupal. It integrates with Prism.js to provide a customizable and efficient syntax-highlighting solution for various file types.

Features

  • Supports syntax highlighting for multiple file extensions.
  • Configurable display options to control formatting and appearance.
  • Local or external library support for flexibility.

Using a Local Library

  1. Download the required JavaScript and CSS library from Prism.js
    • Select all file extensions you want to enable syntax highlighting for on your site.
  2. Move the downloaded prism.js and prism.css files to the following directory in your module's folder:
    text_file_formatter/libraries/
  3. Navigate to Text File Formatter Configurations in the Drupal admin interface.
  4. Locate the External Library Location Setting.
  5. Select the Local radio option to use the locally downloaded library.
  6. Restrict the file extensions in the module configuration to match the extensions selected during the library download.

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
2
Tracked since
Dec 2024
Latest release
1 month ago
Releases (12 mo)
1
Maintenance
Active

Releases

Version Type Core Release date
1.1.0-beta1 Pre-release 10–11 Jul 15, 2026
1.1.0-alpha1 Pre-release 10 Dec 20, 2024