Skip to content

Commit

Permalink
Update enqueueing-assets-in-the-editor.md (#54134)
Browse files Browse the repository at this point in the history
If you are loading a JavaScript file in the relevant section, the extension is wrong.
  • Loading branch information
Olein-jp authored Sep 3, 2023
1 parent 3b114f7 commit 25d328a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/how-to-guides/enqueueing-assets-in-the-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Examples might be adding custom inspector or toolbar controls, registering block
function example_enqueue_editor_assets() {
wp_enqueue_script(
'example-editor-scripts',
plugins_url( 'editor-scripts.css', __FILE__ ) );
plugins_url( 'editor-scripts.js', __FILE__ ) );
}
wp_enqueue_style(
'example-editor-styles',
Expand Down Expand Up @@ -115,4 +115,4 @@ As an alternative, you can use `enqueue_block_editor_assets` so long as the enqu

It’s also important to note that as of WordPress 6.3, assets enqueued by `enqueue_block_assets` are loaded both inside and outside Editor's iframe for backward compatibility. Depending on the script libraries that you are trying to enqueue, this might cause problems. An ongoing discussion about this approach is happening in the Gutenberg [GitHub repository](https://github.com/WordPress/gutenberg/issues/53590).

If you experience issues using any of the methods outlined in this guide that have not been previously reported, please [submit an issue](https://github.com/WordPress/gutenberg/issues/new/choose) on GitHub.
If you experience issues using any of the methods outlined in this guide that have not been previously reported, please [submit an issue](https://github.com/WordPress/gutenberg/issues/new/choose) on GitHub.

0 comments on commit 25d328a

Please sign in to comment.