Options
All
  • Public
  • Public/Protected
  • All
Menu

An interface to define a replacement rule for CustomReplace plugin

Hierarchy

  • CustomReplacement

Index

Properties

matchSourceCaseSensitive

matchSourceCaseSensitive: boolean

Whether the matching should be case sensitive

replacementHTML

replacementHTML: string

HTML string to replace to

Optional shouldReplace

shouldReplace: (replacement: CustomReplacement, content: string, sourceEditor?: IEditor) => boolean

Type declaration

    • A callback to check if the string should be replaced

      Parameters

      • replacement: CustomReplacement

        string to be replaced

      • content: string

        the content where the string is

      • Optional sourceEditor: IEditor

        reference to the editor, allows for more complex replacement rules

      Returns boolean

      true, if the string should be replaced, else return false

sourceString

sourceString: string

Source string to replace from

Generated using TypeDoc