Home Forums Gutenberg Inserter Help Panel Reply To: Inserter Help Panel

  • I actually just revised my code a little. The field to receive the preview data needs to be in the template. I built a repeater with ACF to register the blocks. The acf field doesn’t even need to exist within the block fields, weird but it works.


    'example' => array(
    'attributes' => array(
    	'mode' => 'preview',
    	'data' => array(
    	'gutenberg_preview' => __('<img src="">'),

    Then in the template…
    <div data="gutenberg-preview-img"><?php the_field('gutenberg_preview'); ?></div>