Skip to content

Instantly share code, notes, and snippets.

@bfintal
Last active January 20, 2023 18:17
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save bfintal/b2009ea7b2ed7bc5613585ad6eda0347 to your computer and use it in GitHub Desktop.
import domReady from '@wordpress/dom-ready'
domReady( () => {
if ( window._wpLoadBlockEditor ) {
window._wpLoadBlockEditor.then( function() {
// Do whatever when the block editor is initialized.
} )
}
} )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment