Jump to main content Jump to doc navigation

Event: OnRichTextEditorInit

Fires when a rich text editor is initialized, so Plugins can load the RTE.

  • Service: 1 - Parser Service Events
  • Group: RichText Editor

Event Parameters

From the Resource editing controller:

Name Description
editor The editor the user wants to use.
elements An array of elements to transform into an RTE.
id The ID of the Resource (empty for a new Resource).
resource A reference to the Resource object.
mode Either new or upd, depending on whether the Resource is new.

From the Chunk create/update controllers — the editor key is not passed; only elements and mode are sent. The update controller also passes chunk, a reference to the Chunk being edited.

Passed when the event fires from the TV richtext output renderer on the front end:

Name Description
forfrontend Load the RTE in the front-end context instead of the Manager.
width The requested width of the RTE.
height The requested height of the RTE.

See Also

Support the team building MODX with a monthly donation.

The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.

Backers

  • modmore
  • STERC
  • Digital Penguin
  • Jens Wittmann – Gestaltung & Entwicklung
  • CrewMark
  • Fabian Christen
  • Sepia River Studios
  • Dannevang Digital
  • Alex
  • A. Moreno
  • Chris Fickling
  • Stéphane Jäggi
  • Murray Wood
  • Anton Tarasov
  • JT Skaggs
  • deJaya
  • Lefthandmedia
  • eydolan
  • Following Sea
  • Guido Gallenkamp
  • YJ
  • Raffy
  • Snow Creative
  • Nick Clark
  • Guest
  • Helen
  • krisznet
  • Yanni
  • Richard

Budget

$194 per month—let's make that $500!

Learn more