Documentation Index

Fetch the complete documentation index at: https://docs.document360.com/llms.txt

Use this file to discover all available pages before exploring further.

As of 22 Nov 2025, the Markdown editor has been upgraded from v1.4.10 to v3.2.2. The toolbar, layout, icons, and editor structure remain unchanged.

How to keep dark mode for the Knowledge base site by default

Prev Next

By default, all articles on your knowledge base site display in Light mode. Readers can manually switch between Light and Dark using the theme toggle at the top of each article. If you want Dark mode to be the default experience, so readers arrive on Dark without having to switch, you can implement this using a JavaScript snippet. You can also lock the site to Dark only, removing the toggle entirely so readers always view in Dark mode.


When to use this

Use this customization when you want to:

  • Match your brand identity with a dark-themed knowledge base as the first impression for all readers.
  • Reduce eye strain for readers who primarily read technical documentation in low-light environments.
  • Lock the experience to Dark only, ensuring a consistent visual presentation regardless of reader preference.

Before you begin

  • You need access to Settings (

    ) > Knowledge base site > Site customization > Custom CSS & JavaScript in the Knowledge base portal.
  • Dark mode as default still allows readers to switch to Light mode using the theme toggle at the top of each article. If you want to remove this toggle and enforce Dark mode, complete both parts of this guide.

NOTE

By default, all articles display in Light mode. The JavaScript snippet below overrides this so Dark mode is applied on page load.


Part 1 - Set Dark mode as the default

  1. Navigate to Settings (

    ) > Knowledge base site > Site customization > Custom CSS & JavaScript in the Knowledge base portal.

    Custom CSS and JavaScript settings panel in the Document360 Knowledge base portal

  2. From the left navigation pane, select the JavaScript tab and paste the following snippet:

$(document).ready(function() {
setTimeout(function() { document.getElementById('darkTheme').click(); }, 100); 
});
  1. Click Save.

    JavaScript tab showing the dark mode snippet saved in the Custom CSS and JavaScript panel

All articles on your knowledge base site now load in Dark mode by default. Readers can still switch to Light mode using the Light option at the top of any article.


Part 2 - Lock the site to Dark mode only (optional)

If you want readers to view the site exclusively in Dark mode, with no option to switch to Light, turn off the theme toggle in Site customization.

  1. Navigate to Settings (

    ) > Knowledge base site in the left navigation bar in the Knowledge base portal.

  2. In the left navigation pane, navigate to Site customization.

  3. Under the Site theme section, select the Dark only option and click Save at the top.

    Site customization panel showing the Site theme section with the Dark only option selected

The theme toggle is now removed from all articles. Readers will always view your knowledge base in Dark mode.


Best practices

  • Apply Part 1 and Part 2 together if you need full Dark enforcement. Part 1 alone defaults to Dark but leaves the toggle visible; a reader can still switch to Light. If brand consistency matters, complete Part 2 to remove the toggle.
  • Test across your most-visited articles. After enabling Dark mode as the default, check articles that contain images, tables, and callouts. Some content with hardcoded light backgrounds may need additional CSS adjustments to remain readable in Dark mode.
  • Consider your audience before locking to Dark only. Some readers with accessibility needs or specific display settings prefer Light mode. Removing the toggle takes away their choice; use the lock only when your use case strongly requires it.