Hi folks,
probably a simple question but I'm searching quite a while now (and yes, I'm pretty new to ModX Revo)...
What I want to do is:
A plugin that should change the content of the (rich) text editor whenever the resource is saved.
How can I access (and change) the content of the resource in the OnBeforeDocFormSave or onDocFormSave event (which of the events would be better?)
Is there a code fragment that could help me?
Forgot to attach my code fragment (just for testing):
$output = $resource->get('content');
$output = "<h1>just a test</h1>" . $output;
$resource->set('content',$output);
$resource->save();
This basically changes the content but it does not show in the rich text editor...
Thanks in advance
Thomas
[ed. note: hochmohr last edited this post 11 years, 5 months ago.]