Skip to content

What is the right way to override the ContentBody HTML in 4.3? #414

@mudrd8mz

Description

@mudrd8mz

From what I can understand from

$this->getSubComponentHtml( ContentBody::class, 'ContentBody' ) .
the MainContent component has hard-coded ContentBody as the class to provide the content body HTML.

What is the clean way to inject my own ContentBody subclass to be used instead?

My use-case is that in buildContentBody() I want to perform some DOM modifications and I am trying to find the clean way to customise it.

TIA

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions