• I’m not finding any option to get the current block added to the editor and I couldn’t force an update using the React function forceUpdate(), there is no implementation for that.

    I found this on documentation but I can’t use it. Or i just don’t know how to interact with React.

    wordpress.org/gutenberg/handbook/data/data-core-editor/#getselectedblock

    Another thing would be an action hook to fire after a new block is added to the editor. Is this available?

    • This topic was modified 5 years, 8 months ago by Edir Pedro.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @edir

    I don’t have a good answer to these questions, but you might find someone who knows the answer faster if you ask in the #core-editor channel in WP Slack.

    Moderator Marius L. J.

    (@clorith)

    Hi,

    Sorry for the late response here, could you show us how you are implementing the getSelectedBlock feature (or if you sorted it, give an update on how you achieved it 🙂 ) ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get the selected block instance and force an update?’ is closed to new replies.