Is there any way to render the WordPress Gutenberg core/embed block in PHP by passing in the URL?

I'm trying to render the block HTML dynamically by injecting it within a core/query block. The injection is working fine using DOMDocument, but I can't find out how to render the embed HTML. I can use wp_oembed_get for the iframe, but I need the wrapper DIVs, aspect ratio by provider, and so on.

Topic block-editor oembed Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.