Table of Contents
1. Configure Before Plugin Initialization
Add the following snippet inside your <head> tag or just before loading the plugin’s main JavaScript file:
window.InitPluginSuiteEmbedPostsConfig = {
theme: 'dark'
};
Accepted theme values:
'light'– Always use light mode'dark'– Always use dark mode'auto'– Automatically match the user’s system preference
Example: Enable dark mode if the site uses the uk-light class
document.addEventListener('DOMContentLoaded', function () {
if (document.body.classList.contains('uk-light')) {
window.InitPluginSuiteEmbedPostsConfig = {
theme: 'dark'
};
}
});
2. Where Dark Mode Applies
- The embed code modal (shown when clicking the “Embed” button)
- Admin icons or UI elements included in your editor or settings page
Notes
- The plugin automatically adds the
iep-darkclass to the modal when dark mode is enabled or detected. - You can further customize the modal’s appearance using the
.iep-darkclass if needed.
Comments