Dynamic headline external link

Currently, when setting a GenerateBlocks dynamic headline link, there is no way to set that link to load in a new browser window.

Dynamic headline settings
Dynamic headline settings

You can achieve that with the render_block filter which is available for all core blocks. Just assign a class to the GB headline that needs to link to a new window.

Dynamic headline custom class
Dynamic headline custom class

Then add this PHP code to your functions.php. Please, use a child theme for this.

add_filter( 'render_block', function( $block_content, $block ) {
    if ( 'generateblocks/headline' === $block['blockName'] ) {
		if (isset($block['attrs']['className']) && strpos( $block['attrs']['className'], 'external-link' ) !== false ) {
				$block_content = str_replace( '<a ', '<a target="_blank" ', $block_content );
		}
    }

    return $block_content;
}, 10, 2 );

Now, any headline dynamic links with the class of external-link will load in a new window. Adjust your class name accordingly.