Skip to main content
added 239 characters in body
Source Link

I'm currently new to the Gutenberg block development. I was wondering if there is a way to detect when the user clicks the publish/update button?

Reason for this is that i need to call a custom function right after the button click.

The purpose for the custom function is to keep a copy of the original content. After succeeding publish/update click, the block will compare the updated content with the original content for certain keywords.

Thank you for replying.

I'm currently new to the Gutenberg block development. I was wondering if there is a way to detect when the user clicks the publish/update button?

Reason for this is that i need to call a custom function right after the button click.

I'm currently new to the Gutenberg block development. I was wondering if there is a way to detect when the user clicks the publish/update button?

Reason for this is that i need to call a custom function right after the button click.

The purpose for the custom function is to keep a copy of the original content. After succeeding publish/update click, the block will compare the updated content with the original content for certain keywords.

Thank you for replying.

edited tags
Link
Tom J Nowell
  • 60.6k
  • 7
  • 77
  • 147
Source Link

How to detect when the user clicks the publish/update button in Gutenberg Editor

I'm currently new to the Gutenberg block development. I was wondering if there is a way to detect when the user clicks the publish/update button?

Reason for this is that i need to call a custom function right after the button click.