interface TextEditorEnricherConfig {
    enricher: TextEditorEnricher;
    id?: string;
    onRender?: (arg0: HTMLEnrichedContentElement) => any;
    pattern: RegExp;
    replaceParent?: boolean;
}

Properties

The function that will be called on each match. It is expected that this returns an HTML element to be inserted into the final enriched content.

id?: string

A unique ID to assign to the enricher type. Required if you want to use the onRender callback.

onRender?: (arg0: HTMLEnrichedContentElement) => any

An optional callback that is invoked when the enriched content is added to the DOM.

pattern: RegExp

The string pattern to match. Must be flagged as global.

replaceParent?: boolean

Hoist the replacement element out of its containing element if it replaces the entire contents of the element.