Skip to content

How to add csp validation for admin cms content which have script

I have multiple js code which i am loading on checkout using admin cms block content like

// Change Text of Label in Create Account Page
const el = document.querySelector(‘.element’);
el.innerText = ‘Content Added To Element’;

now on checkout i am getting csp issue which i don’t know how to resolve.
i have many scripts like this so i can’t convent them to phml code.