Back to Devexpress

SavingEvent Class

aspnetcore-js-devexpress-dot-richedit-ae5a5c98.md

latest2.1 KB
Original Source

SavingEvent Class

An event that allows you to save a document.

Declaration

ts
export class SavingEvent extends RichEditEvent<SavingEventArgs>

Remarks

You can define the Saving event handler either at the server side, at the client side, or at runtime.

cshtml
<script>
 function savingDocument(s,e) {
   e.handled = true;
   console.log(e.base64);
   console.log(e.fileName);
   console.log(e.format);
 }
</script>
@(Html.DevExpress().RichEdit("richEdit")
 .OnSaving("savingDocument")
 // ...
javascript
const options = DevExpress.RichEdit.createOptions();
options.events.saving = function(s,e) {
  e.handled = true;
  console.log(e.base64);
  console.log(e.fileName);
  console.log(e.format);
};
javascript
richEdit.events.saving.addHandler(function(s, e) {
  e.handled = true;
  console.log(e.base64);
  console.log(e.fileName);
  console.log(e.format);
});

The event handler receives an argument of the SavingEventArgs type. The argument’s properties provide information specific to this event.

See Save a Document for more information.

Inherited Members

addHandler(handler)

clearHandlers

isEmpty

removeHandler(handler)

Inheritance

Event<TSource, TEventArgs> RichEditEvent<TEventArgs> SavingEvent

See Also

Client-Side Events