Title: run function on editor right (components) panel update
Last modified: April 12, 2023

---

# run function on editor right (components) panel update

 *  [thomask](https://wordpress.org/support/users/thomask/)
 * (@thomask)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/run-function-on-editor-right-components-panel-update/)
 * I want to change slightly content of excerpt component panel (i want to add a
   counter). It works by simply adding a script to the post.php page. But when I
   then click e.g. to editor, than the right panel switch from Post to Block and
   when I go back to Post panel, it is whole reinitialised so again without my changes.
   
   Is there any way how can i run my script always when that component panel is 
   generated? (e.g. catch some event)thanks
    -  This topic was modified 3 years, 1 month ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).

Viewing 1 replies (of 1 total)

 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/run-function-on-editor-right-components-panel-update/#post-16645234)
 * You would have to write an extension for the Block Editor to customize this component.
   Only then it will be displayed in the editor again and again.
 * Starting point for this would be the developer manual here: [https://developer.wordpress.org/block-editor/](https://developer.wordpress.org/block-editor/)
 * I guess there should be a filter for this, but I couldn’t find it. Maybe a question
   about your request will help here: [https://github.com/WordPress/gutenberg/issues](https://github.com/WordPress/gutenberg/issues)

Viewing 1 replies (of 1 total)

The topic ‘run function on editor right (components) panel update’ is closed to 
new replies.

## Tags

 * [gutenberg](https://wordpress.org/support/topic-tag/gutenberg/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [threadi](https://wordpress.org/support/users/threadi/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/run-function-on-editor-right-components-panel-update/#post-16645234)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
