How to inject data that wordpress gets into embed from a server.
E.g. Add my <div>
to each embed data inside gutenberg editor.
I did use embed_oembed_html
but this one only imprints html when I render the page (preview).
Visual block Editor (Gutenberg) somehow omitted.
I'm wondering is this normal in general for this hook and is there may be some other hook to inject html into any iframe.
Just in case:
add_filter( 'embed_oembed_html', 'my_method', 99, 3 );
function my_method( $html, $url, $args ) {
return $html.'<div>Some text!</div>';
};