Title: wp_enqueue_block_editor_script_modules
Published: May 20, 2026

---

# wp_enqueue_block_editor_script_modules()

## In this article

 * [Source](https://developer.wordpress.org/reference/functions/wp_enqueue_block_editor_script_modules/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_enqueue_block_editor_script_modules/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_enqueue_block_editor_script_modules/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_enqueue_block_editor_script_modules/?output_format=md#wp--skip-link--target)

Enqueues script modules required by the block editor.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_enqueue_block_editor_script_modules/?output_format=md#source)󠁿

    ```php
    function wp_enqueue_block_editor_script_modules() {
    	/*
    	 * Enqueue the LaTeX to MathML loader for the math block editor.
    	 * The loader dynamically imports the main LaTeX to MathML module when needed.
    	 */
    	wp_enqueue_script_module( '@wordpress/latex-to-mathml/loader' );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/script-modules.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/script-modules.php#L229)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/script-modules.php#L229-L235)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_enqueue_block_editor_script_modules/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_enqueue_script_module()](https://developer.wordpress.org/reference/functions/wp_enqueue_script_module/)`wp-includes/script-modules.php` |

Marks the script module to be enqueued in the page.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_enqueue_block_editor_script_modules/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.9.0](https://developer.wordpress.org/reference/since/6.9.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_enqueue_block_editor_script_modules%2F)
before being able to contribute a note or feedback.