editor-js / paragraph

Paragraph Tool for Editor.js 2.0
MIT License
41 stars 124 forks source link

Enable useStrictCSP for cssInjectedByJsPlugin #80

Open jsip opened 9 months ago

jsip commented 9 months ago

Enables useStrictCSP when injecting styles. See https://github.com/marco-prontera/vite-plugin-css-injected-by-js#usestrictcsp-boolean

Does not throw any errors if meta property is not present

useStrictCSP ? `elementStyle.nonce = document.head.querySelector('meta[property=csp-nonce]')?.content;` : ''

Updated README to reflect the out of the box support