IssueRaiser

Do not use inline styles!

monaco-editor npm version: 0.7.0 Browser: Edge, Chrome OS: Windows We use up to date CSP security rules and deny inline styles to prevent browser-based attacks: ```default-src: 'none'; style-src: 'self';``` The editor uses inline styles instead of DOM manipulation which is not allowed in a context like this. The browsers refuse to apply these styles which makes the editor render unreadable: ```editor.main.js:59 Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-DNZrVDWDsOLjYnOQ2E2tq7OIosyNLfBDcLuoNqGotlQ='), or a nonce ('nonce-...') is required to enable inline execution.```

Posted by Peter-Juhasz on Nov 21, 2016, 8:05 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments

github (Other)

Do not use inline styles!

Peter-JuhaszNov 21, 2016, 8:05 PM

monaco-editor npm version: 0.7.0 Browser: Edge, Chrome OS: Windows We use up to date CSP security rules and deny inline styles to prevent browser-based attacks: ```default-src: 'none'; style-src: 'self';``` The editor uses inline styles instead of DOM manipulation which is not allowed in a context like this. The browsers refuse to apply these styles which makes the editor render unreadable: ```editor.main.js:59 Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-DNZrVDWDsOLjYnOQ2E2tq7OIosyNLfBDcLuoNqGotlQ='), or a nonce ('nonce-...') is required to enable inline execution.```

Comments (0)

No comments yet. Start the discussion.

Comment on this issue