Title: Enqueuing Admin Scripts
Last modified: March 13, 2019

---

# Enqueuing Admin Scripts

 *  Resolved [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/enqueuing-admin-scripts/)
 * Please change this from:
 * `add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));`
 * To this:
 * `add_action('enqueue_block_editor_assets', array($this, 'admin_enqueue_scripts'));`
 * This way the admin scripts are only enqueued on the Editor pages. This needs 
   done because it throws JS errors on other pages.
 * Thanks!!!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Vicky Agravat](https://wordpress.org/support/users/vickyagravat/)
 * (@vickyagravat)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/enqueuing-admin-scripts/#post-11322332)
 * Hello Steven,
 * Thank you very much for your suggestion.
 * I will update the code in next update.
 *  Plugin Author [Vicky Agravat](https://wordpress.org/support/users/vickyagravat/)
 * (@vickyagravat)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/enqueuing-admin-scripts/#post-11324530)
 * Hello Steven,
 * I have updated the plugin with your suggested change.
 * Now, update the plugin to 1.0.7
 * If you like the plugin…
    Please, provide your valuable review with enough star
   ratting.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Enqueuing Admin Scripts’ is closed to new replies.

 * ![](https://ps.w.org/wp-codemirror-block/assets/icon-256x256.png?rev=2001365)
 * [CodeMirror Blocks](https://wordpress.org/plugins/wp-codemirror-block/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-codemirror-block/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-codemirror-block/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-codemirror-block/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-codemirror-block/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-codemirror-block/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Vicky Agravat](https://wordpress.org/support/users/vickyagravat/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/enqueuing-admin-scripts/#post-11324530)
 * Status: resolved