This project is not covered by Drupal’s security advisory policy.
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
- Download the required JavaScript and CSS library from Prism.js
- Select all file extensions you want to enable syntax highlighting for on your site.
- Move the downloaded
prism.jsandprism.cssfiles to the following directory in your module's folder:
text_file_formatter/libraries/ - Navigate to Text File Formatter Configurations in the Drupal admin interface.
- Locate the External Library Location Setting.
- Select the Local radio option to use the locally downloaded library.
- Restrict the file extensions in the module configuration to match the extensions selected during the library download.
Project information
Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed.Maintenance fixes only
Considered feature-complete by its maintainers.- Project categories: Content display
1 site reports using this module
- Created by toamit on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
1.1.0-alpha1
released 20 December 2024
Works with Drupal: ^10
Enables syntax highlighting for files by using prismjs
Install: