By Sean


2019-02-06 18:32:48 8 Comments

I want to run some JavaScript when a user uploads an image or images using the core/image block or core/gallery block. Ideally I would run my own code when the onSelectImage function is called (and the equivalent for core/gallery). I've looked at hooks in Gutenberg but it seems that they're only available in a small number of places, and there are none directly for the core/image or core/gallery blocks.

I know the developers intend to make it easy to apply actions and filters in Gutenberg, but I'm not sure if they just haven't added any hooks/filters for the core/image block yet or if it's already possible but I'm not seeing how to do it.

0 comments

Related Questions

Sponsored Content

1 Answered Questions

create-guten-block in wordpress theme?

1 Answered Questions

What are all the query parameters for getEntityRecords?

0 Answered Questions

2 Answered Questions

1 Answered Questions

[SOLVED] gutenberg dynamic block is returning 404

0 Answered Questions

Modify the core/paragraph block

  • 2019-01-06 15:05:36
  • Michael
  • 218 View
  • 2 Score
  • 0 Answer
  • Tags:   block-editor

0 Answered Questions

Modifying the Gutenberg Button Block

  • 2018-12-02 14:26:13
  • Moshe
  • 266 View
  • 2 Score
  • 0 Answer
  • Tags:   block-editor

2 Answered Questions

[SOLVED] For developers, what impact can we expect Gutenberg to have on the loop?

  • 2018-10-29 02:38:25
  • GoingMush
  • 65 View
  • 0 Score
  • 2 Answer
  • Tags:   block-editor

0 Answered Questions

How to use styled-components within a custom Gutenberg block?

1 Answered Questions

[SOLVED] Extend core block in Gutenberg

Sponsored Content