Thread Starter
kgohil
(@kgohil)
Hi ok I somehow found a fix through js
const removeHeadingIDs = () => {
const blocks = wp.data.select(‘core/block-editor’).getBlocks();
blocks.forEach(block => {
if(block.name == ‘core/heading’ && (block.attributes.anchor)){
if (block.attributes.anchor.indexOf(‘h-‘) === 0) {
wp.data.dispatch(‘core/block-editor’).updateBlockAttributes(block.clientId, {anchor:”});
}
}
});
};
window.onload = function() {
removeHeadingIDs();
};`