Represents a Theme definition available in the current installation of Drafts.

Find and assign the active light theme

let theme = Theme.find("builtIn", "dark");
app.lightTheme = theme;

Identification

installURL: string

URL which can be used to install this Theme in another installation of Drafts. Useful for sharing and backups.

name: string

The name of the theme definition.

type: themeType

The type (builtIn, custom, file) of the theme definition.

Other

  • Search for a theme definition matching the type and name passed and return it if found. Returns undefined if not found.

    Parameters

    Returns Theme

  • Get list of all available themees.

    Returns Theme[]