Skip to content

Commit 624f4b1

Browse files
instanceofnullJustin Skaggs
andauthored
use nonce value is supplied (#792)
Co-authored-by: Justin Skaggs <[email protected]>
1 parent e6fcb01 commit 624f4b1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/core/src/extensions/Placeholder/PlaceholderPlugin.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ export const PlaceholderPlugin = (
1212
key: PLUGIN_KEY,
1313
view: () => {
1414
const styleEl = document.createElement("style");
15+
const nonce = editor._tiptapEditor.options.injectNonce;
16+
if (nonce) {
17+
styleEl.setAttribute("nonce", nonce);
18+
}
1519
document.head.appendChild(styleEl);
1620
const styleSheet = styleEl.sheet!;
1721

0 commit comments

Comments
 (0)