This module allows content authors to create and manage JavaScript and CSS code snippets as content entities. These code libraries can then be easily attached to specific pages using an entity reference field, enabling reusable code inclusion directly within Drupal content.
The library content module allows users to create JS and CSS libraries as content.
These libraries can be included on pages by adding a reference field that points to library content entities.
Features
Use this module if content authors require a way include custom JS or CSS with content. This modules gives author a away to create and maintain reusable JS/CSS snippets inside of Drupal.
This module is meant to help when there are multiple "one-off-ish" JS/CSS segments that appears multiple times, but only on a few pages.
Post-Installation
Once installed, you must create an entity reference field on the content that you'd like the libraries to be displayed on. That entity reference field must reference library content entities.
Once the reference is created, the selected library content libraries are automatically included when that content is rendered.
Additional Requirements
The Codemirror Editor - This is used to provide the editor interface.
Similar projects
Libraries API - This module lets you definitely JS/CSS libraries, but as configuration instead of content.
Ask your assistant about Library Content
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
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
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.x-dev | Dev | 11 | Oct 14, 2026 |