Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Theme

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

Example: Find and assign the active light theme

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

Hierarchy

  • Theme

Index

Identification Properties

Methods

Identification Properties

Readonly installURL

installURL: string

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

name

name: string

The name of the theme definition.

type

type: themeType

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

Methods

Static find

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

    Parameters

    Returns Theme | undefined

Static getAll

Generated using TypeDoc