Hi
For modifying content before saving to database I can use the following code within a page:
function onBeforeWrite() {
$this->Content = str_replace("[[placeholder]]", "replacement123", $this->Content);
parent::onBeforeWrite();
}
Is there a method to call to reset to the placeholder string before the content gets loaded to the editor?
Something like this?
function onBeforeLoadToEditor() {
$this->Content = str_replace("replacement123", "[[placeholder]]", $this->Content);
parent::onBeforeLoadToEditor();
}
Thanks, Bjoern