RichTextExtension
in
A RichTextExtension class can be used to prepare or postprocess a richtext prior of rendering or converting.
Tags
Table of Contents
Methods
- onAfterConvert() : string
- Callback function called after a converter finished processing a richtext. This callback can be used to preprocess an already converted richtext.
- onAfterOutput() : string
- Callback function called after a richtext output is rendered. This callback can be used to postprocess a richtext widget result.
- onBeforeConvert() : string
- Callback function called before a converter started to parse the a richtext. This callback can be used to prepare a richtext prior conversion to a given format.
- onBeforeOutput() : string
- Callback function called before a richtext output is rendered. This callback can be used to prepare a richtext widget prior of rendering.
- onPostProcess() : string
- Callback function called after a richtext output is rendered. This callback can be used to postprocess a richtext widget result.
Methods
onAfterConvert()
Callback function called after a converter finished processing a richtext. This callback can be used to preprocess an already converted richtext.
public
onAfterConvert(string $text, string $format[, array<string|int, mixed> $options = [] ]) : string
Parameters
- $text : string
- $format : string
- $options : array<string|int, mixed> = []
Return values
stringonAfterOutput()
Callback function called after a richtext output is rendered. This callback can be used to postprocess a richtext widget result.
public
onAfterOutput(ProsemirrorRichText $richtext, string $output) : string
Parameters
- $richtext : ProsemirrorRichText
- $output : string
Return values
stringonBeforeConvert()
Callback function called before a converter started to parse the a richtext. This callback can be used to prepare a richtext prior conversion to a given format.
public
onBeforeConvert(string $text, string $format[, array<string|int, mixed> $options = [] ]) : string
Parameters
- $text : string
- $format : string
- $options : array<string|int, mixed> = []
Return values
stringonBeforeOutput()
Callback function called before a richtext output is rendered. This callback can be used to prepare a richtext widget prior of rendering.
public
onBeforeOutput(ProsemirrorRichText $richtext, string $output) : string
Parameters
- $richtext : ProsemirrorRichText
- $output : string
Return values
stringonPostProcess()
Callback function called after a richtext output is rendered. This callback can be used to postprocess a richtext widget result.
public
onPostProcess(string $text, ActiveRecord $record, string|null $attribute, array<string|int, mixed> &$result) : string
Parameters
- $text : string
- $record : ActiveRecord
- $attribute : string|null
- $result : array<string|int, mixed>