diff --git a/forms/HtmlEditorField.php b/forms/HtmlEditorField.php
index c5c32d8c2..246603e83 100644
--- a/forms/HtmlEditorField.php
+++ b/forms/HtmlEditorField.php
@@ -140,8 +140,15 @@ class HtmlEditorField extends TextareaField {
// Add default empty title & alt attributes.
if(!$img->getAttribute('alt')) $img->setAttribute('alt', '');
if(!$img->getAttribute('title')) $img->setAttribute('title', '');
+
+ // Use this extension point to manipulate images inserted using TinyMCE, e.g. add a CSS class, change default title
+ // $image is the image, $img is the DOM model
+ $this->extend('processImage', $image, $img);
}
+ // optionally manipulate the HTML after a TinyMCE edit and prior to a save
+ $this->extend('processHTML', $htmlValue);
+
// Store into record
$record->{$this->name} = $htmlValue->getContent();
}