[+] Obtain Block attribute data on dev tools console

Sometimes you might need to translate a specific Block attribute, that requires a specific key inside its XML config.

Go to the Block Editor, and select the Block that you would like to translate.

Now, open the browser’s console and obtain the Block data incl. attributes by entering:

wp.data.select( 'core/block-editor' ).getSelectedBlock().attributes;

 


Let us know if this snippet is not working for you:

This snippet doesn’t work
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments