Drupal is a registered trademark of Dries Buytaert
Release: Module Filter 6.0.0 Major update available for module module_filter (6.0.0). Release: User Restrictions 2.1.1 Minor update available for module user_restrictions (2.1.1). Release: Opensolr Search 4.2.2 Minor update available for module opensolr_search (4.2.2). Release: Media Entity Calameo 2.0.0 Major update available for module media_entity_calameo (2.0.0). Release: Monster Menus 9.5.2 Minor update available for module monster_menus (9.5.2). Release: Monolog Datadog 3.0.2 Minor update available for module monolog_datadog (3.0.2). Release: Migrate Cron Scheduler 2.1.0 Minor update available for module migrate_cs (2.1.0). Release: Webform Ban 1.2.5 Minor update available for module webform_ban (1.2.5). Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs. Module Revived: Disable Login Page 1.1.4 Module disable_login updated after 8 months of inactivity (1.1.4).

Javascript Editor

56 sites Security covered
View on drupal.org

This module provides a browser-based interface for administrators to add and edit custom JavaScript code for themes. It offers a rich text editor with syntax highlighting directly within theme settings, allowing for easy customization of site behavior without needing to edit theme files directly.

This module allows administrators to customize a theme's JS through the browser, using a rich text editor with syntax highlighting.

On the settings page of each theme it will be displayed a textarea where the admin can type custom Javascript code.
The feature can be enabled to multiple themes on the same site.

This module is compatible with Drupal 8 and 9.

Installation

Install this module via composer by running the following command:

composer require drupal/js_editor

Basic usage

  1. Install the module
  2. Go to /admin/appearance
  3. Edit an Installed theme
  4. At the bottom of te page activate the checkbox "Enable or disable custom JS"
  5. Enter your custom Javascript code
  6. Save the configuration

Similar Modules

  • Asset Injector: has the same functionality.
    • Advantage: Javascript Editor configuration is available in the theme settings.
  • CSS Editor: allows site builders to customize a theme's CSS through the browser.

Activity

Tracked releases
1
Tracked since
Jul 2026
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.1.0 Stable Jul 12, 2026