Skip to main content

EmojiMatcher

Hierarchy

Index

Constructors

constructor

Properties

data

data: null | EmojiDataManager = null

factory

factory: null | ComponentType<EmojiProps>

greedy

greedy: boolean = true

inverseName

inverseName: string

options

propName

propName: string

Methods

asTag

  • asTag(): string

createElement

  • createElement(children: ChildrenNode, props: EmojiProps): 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<EmojiMatch>

matchEmoticon

  • matchEmoticon(string: string): null | MatchResponse<EmojiMatch>

matchShortcode

  • matchShortcode(string: string): null | MatchResponse<EmojiMatch>

matchUnicode

  • matchUnicode(string: string): null | MatchResponse<EmojiMatch>

onAfterParse

  • onAfterParse(content: Node[], props: EmojiProps): Node[]
  • When a single Emoji is the only content, enlarge it!

onBeforeParse

  • onBeforeParse(content: string, props: EmojiProps): string
  • Load emoji data before matching.

replaceWith

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