Custom Theme Set as Default but Not Reflecting in Editor
- ONLYOFFICE 9.00
- Docker
- Custom theme name:
"theme-asp"
- Theme class is applied to
<body>
at runtime - Customization config correctly sets
theme-asp
as the default
I’ve created a custom theme called "theme-asp"
and set it as the default theme using the customization config:
{"customization": {"uiTheme": "theme-asp"} }
At runtime, I verified that the theme class is applied to the body as:
htmlCopyEdit<body class="theme-asp">
However, the visual appearance and CSS variable values (like toolbar background, text colors, etc.) still reflect the default “light” theme. It seems that theme-asp
is not being fully recognized, or its variables are not being applied.
Troubleshooting Done:
- Checked that
theme-asp
is applied as class to<body>
. - Customization config correctly uses
"defaultTheme": "theme-asp"
. - Despite this, the styles such as
--toolbar-header-document
,--text-toolbar-header
, etc., reflect"theme-light"
values. - Have already restarted the doc server and cleared cache from server and also browser cache.
- No errors in console related to loading CSS.
- Not sure if the theme CSS file for
theme-asp
is being correctly bundled and loaded in the editor. - In localStorage values are set theme-light values but the theme name is still in theme-asp.
- Did try changing theme from light to theme-asp manually then only its applying.
- Where should the custom theme variables for
.theme-asp
be defined so that the editor picks them up? - How do I ensure the
theme-asp
CSS block is included in the editor build or theme bundle? - Is there a way to debug whether
theme-asp
variables are registered or overridden at runtime? - Does the editor cache previous themes from localStorage that might interfere with theme loading?