Support

Account

Home Forums Gutenberg Dispatch Javascript event on acf/ajax/render_block_preview success Reply To: Dispatch Javascript event on acf/ajax/render_block_preview success

  • Actually, I spoke too soon. Looks like there is already a JS event in ACF Pro for handline this situation. The event is:

    render_block_preview

    It passes two arguments, the element as a jQuery object and details about the block (name, content, mode, etc…). I put together a quick example usage here:

    https://gist.github.com/hereswhatidid/a67dc3697a481c223bdced42586f6664