Skip to content

Example of Events in ASP.NET MVC Rich Text Editor Control

This sample demonstrates the events that trigger on every action of the Rich Text Editor. The event details are showcased in the event trace panel.

Event Trace

The Rich Text Editor triggers the events based on its actions. The events can be used as an extension point to perform custom operations.

  • OnChange – Triggers when the editor gets blurred and changes are made to the content (or when the save interval has passed).
  • OnFocus – Triggers when the editor is in focus.
  • OnBlur – Triggers when focused out of the editor.
  • OnActionBegin – Triggers before the execution of command.
  • OnActionComplete – Triggers after the execution of command.
  • OnCreated – Triggers when the component is created.
  • OnBeforeDialogOpen, OnDialogOpen and OnDialogClose – Trigger as a dialog is being opened, is opened, and has been closed.
  • OnBeforeQuickToolbarOpen, OnQuickToolbarOpen and OnQuickToolbarClose – Trigger as the quick toolbar is being opened, is opened, and has been closed.
  • OnImageSelected – Triggers when the image is selected or dragged into the insert image dialog.
  • OnImageUploading – Triggers when the selected image begins to upload in the insert image dialog.
  • OnImageUploadSuccess – Triggers when the image is successfully uploaded to the server side.
  • OnImageUploadFailed – Triggers when there is an error in the image upload.
  • OnImageRemoving – Triggers when the selected image is cleared from the insert image dialog.
  • OnResizing, OnResizeStart and OnResizeStop – Trigger while an image is resized (and when the editor is resized, with EnableResize).
  • OnSelectionChanged – Triggers only when the selection within the editor is modified.
  • OnDestroyed and OnBeforeSanitizeHtml – Trigger when the component is destroyed and before the value is sanitized.