Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AutoformatMarkRule<V, E>

Type parameters

Hierarchy

Index

Properties

Optional ignoreTrim

ignoreTrim: boolean

If false, do not format when the string can be trimmed.

Optional insertTrigger

insertTrigger: boolean

If true, insert the triggering character after autoformatting.

default:

false

match

match: string | MatchRange | string[] | MatchRange[]

The rule applies when the trigger and the text just before the cursor matches. For mode: 'block': lookup for the end match(es) before the cursor. For mode: 'text': lookup for the end match(es) before the cursor. If format is an array, also lookup for the start match(es). For mode: 'mark': lookup for the start and end matches. Note: '_*', ['_*'] and { start: '_*', end: '*_' } are equivalent.

mode

mode: "mark"

Optional query

query: (editor: E, options: AutoformatQueryOptions<V, E>) => boolean

Query to allow autoformat.

Type declaration

Optional trigger

trigger: string | string[]

Triggering character to autoformat.

default

the last character of match or match.end

type

type: string | string[]

Mark(s) to add.

Generated using TypeDoc