Enable strict CSP support for ACE
With these changes, ACE no longer requires custom inline styles, removing one further dependency from our CSP style list.
This commit is contained in:

committed by
Sebastian Serth

parent
3bfce7f1cb
commit
7b769a7673
@ -85,4 +85,5 @@ import "ace-builds/webpack-resolver"; // Enable webpack resolver, requires `file
|
|||||||
// Enable ACE editor extensions. See https://github.com/ajaxorg/ace/wiki/Extensions
|
// Enable ACE editor extensions. See https://github.com/ajaxorg/ace/wiki/Extensions
|
||||||
import "ace-builds/src-noconflict/ext-language_tools"; // Enable autocompletion
|
import "ace-builds/src-noconflict/ext-language_tools"; // Enable autocompletion
|
||||||
import "ace-builds/src-noconflict/ext-modelist"; // Enable language mode detection
|
import "ace-builds/src-noconflict/ext-modelist"; // Enable language mode detection
|
||||||
|
ace.config.set("useStrictCSP", true); // Enable strict CSP mode
|
||||||
window.ace = ace; // Publish ace in global namespace
|
window.ace = ace; // Publish ace in global namespace
|
||||||
|
@ -12,6 +12,12 @@ $web-font-path: '//';
|
|||||||
@import '~bootstrap/scss/bootstrap';
|
@import '~bootstrap/scss/bootstrap';
|
||||||
@import '~bootswatch/dist/yeti/bootswatch';
|
@import '~bootswatch/dist/yeti/bootswatch';
|
||||||
|
|
||||||
|
// Import the Ace editor styles
|
||||||
|
@import url('~ace-builds/css/ace.css');
|
||||||
|
@import url('~ace-builds/css/theme/tomorrow.css');
|
||||||
|
@import url('~ace-builds/css/theme/tomorrow_night.css');
|
||||||
|
|
||||||
|
|
||||||
// We define our own button style here, since `btn-outline-dark` and `btn-outline-light` do not switch colors.
|
// We define our own button style here, since `btn-outline-dark` and `btn-outline-light` do not switch colors.
|
||||||
html[data-bs-theme="dark"] {
|
html[data-bs-theme="dark"] {
|
||||||
.btn-outline-contrast {
|
.btn-outline-contrast {
|
||||||
|
Reference in New Issue
Block a user