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

Example

Find and Assign a Syntax

let syntax = Syntax.find("builtIn", "Markdown");
draft.syntax = syntax;
draft.update();

Hierarchy

  • Syntax

Identification

installURL: string

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

name: string

The name of the syntax definition.

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

Other

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

    Parameters

    Returns Syntax

  • Get list of all available syntaxes.

    Returns Syntax[]

Generated using TypeDoc