I have to select text from gutenberg editor. Purpose is to store and replace text
We have to select text from the Gutenberg editor. The purpose is to store and replace text. Please use this code to help us with you const { select } = wp.data; const selectedBlock = select(‘core/block-editor’).getSelectedBlock(); if (selectedBlock) { const selectedText = selectedBlock.attributes.content; console.log(“Selected Text:”, selectedText); // Store the selectedText as needed. } Replacing Text … Read more