diff --git a/packages/core/src/extensions/Placeholder/PlaceholderPlugin.ts b/packages/core/src/extensions/Placeholder/PlaceholderPlugin.ts index aa7f423126..1fb6cac721 100644 --- a/packages/core/src/extensions/Placeholder/PlaceholderPlugin.ts +++ b/packages/core/src/extensions/Placeholder/PlaceholderPlugin.ts @@ -12,6 +12,10 @@ export const PlaceholderPlugin = ( key: PLUGIN_KEY, view: () => { const styleEl = document.createElement("style"); + const nonce = editor._tiptapEditor.options.injectNonce; + if (nonce) { + styleEl.setAttribute("nonce", nonce); + } document.head.appendChild(styleEl); const styleSheet = styleEl.sheet!;