Abstract Class humhub\modules\content\widgets\richtext\AbstractRichTextProcessor

Inheritancehumhub\modules\content\widgets\richtext\AbstractRichTextProcessor » yii\base\BaseObject
Subclasseshumhub\modules\content\widgets\richtext\HumHubRichTextProcessor, humhub\modules\content\widgets\richtext\ProsemirrorRichTextProcessor
Available since version1.3

Rich text processors are used to post-process the rich text after saving the related content record.

By default this includes the parsing of mentionings and oembed links, a rich text implementation may provide further post-processing steps.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
parseFiles() This function can be used to parse file-guid based links e.g. for auto attachment. humhub\modules\content\widgets\richtext\AbstractRichTextProcessor
parseMentioning() This function is called while processing the richtext content and is responsible for parsing and creating mentionings. humhub\modules\content\widgets\richtext\AbstractRichTextProcessor
parseOembed() This function is called while processing the Richtext content and will parse the given text for urls and preloads the oembed result. humhub\modules\content\widgets\richtext\AbstractRichTextProcessor
process() Executes post process logic humhub\modules\content\widgets\richtext\AbstractRichTextProcessor

Property Details

$record public property
$text public property

RichText content

public string $text null

Method Details

parseFiles() public method

This function can be used to parse file-guid based links e.g. for auto attachment.

public void parseFiles ( )
parseMentioning() public abstract method

This function is called while processing the richtext content and is responsible for parsing and creating mentionings.

Richtext implementations have to provide their own parsing logic.

e.g:

$guids = someParserLogic();
return Mentioning::mention($guids, $record);
public abstract array parseMentioning ( )
return array

List of successfully mentioned users

parseOembed() public abstract method

This function is called while processing the Richtext content and will parse the given text for urls and preloads the oembed result.

Richtext subclasses have to provide their own parsing logic.

public abstract void parseOembed ( )
process() public method

Executes post process logic

public void process ( )