Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Syntax

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

Index

Identification Properties

Methods

Identification Properties

Readonly installURL

installURL: string

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

name

name: string

The name of the syntax definition.

type

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

Methods

Static find

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

    Parameters

    Returns Syntax | undefined

Static getAll

Generated using TypeDoc