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

disable the post title field after publishing

Use the action hook edit_form_after_title The display:none rule might cause some JS issue so it might be best to use visibility:hidden so the element is still accessible to whatever scripts in the DOM. This condition will hide the form fields and show the title and URL statically. add_action(‘edit_form_after_title’, function($post) { if( !empty($post->post_title) && !current_user_can(‘manage_options’) ) … Read more

techhipbettruvabetnorabahisbahis forumuedueduedueduseduedusedusedusedusedu