Skip to main content

EmailMatcher

Hierarchy

Index

Constructors

constructor

Properties

factory

factory: null | ComponentType<EmailProps>

greedy

greedy: boolean

inverseName

inverseName: string

options

options: {}

propName

propName: string

Methods

asTag

  • asTag(): string

createElement

  • createElement(children: ChildrenNode, props: EmailProps): Node
  • Attempts to create a React element using a custom user provided factory, or the default matcher factory.

doMatch

  • doMatch<T>(string: string, pattern: string | RegExp, callback: MatchCallback<T>, isVoid?: boolean): null | MatchResponse<T>
  • Trigger the actual pattern match and package the matched response through a callback.


    Type parameters

    • T

match

  • match(string: string): null | MatchResponse<EmailMatch>

onAfterParse

  • onAfterParse(content: Node[], props: EmailProps): Node[]
  • Callback triggered after parsing.

onBeforeParse

  • onBeforeParse(content: string, props: EmailProps): string
  • Callback triggered before parsing.

replaceWith

  • replaceWith(children: ChildrenNode, props: EmailProps): Node