JS

RichEditBuilder.OnSaved(String) Method

Assigns an event handler to the Saved event.

Namespace: DevExpress.AspNetCore.RichEdit

Assembly: DevExpress.AspNetCore.RichEdit.v21.1.dll

Declaration

public RichEditBuilder OnSaved(
    string callback
)

Parameters

Name Type Description
callback String

The name of the JavaScript function or the JavaScript function code used to handle the event.

Returns

Type Description
RichEditBuilder

The builder for the Rich Text Editor.

Remarks

The Saved event fires after a document was sent to the server side for saving and the server sent a response. The event handler receives an argument of the SavedEventArgs type. The argument’s success property indicates whether the request has succeeded.

Use the ExportUrl(String) property to specify the path where the exported document is sent for saving. If the property is not specified, the Saved event does not fire.

@(Html.DevExpress().RichEdit("richEdit")
  .OnSaved(
    "function(s, e) {" +
    "console.log(e.reason);" +
    "console.log(e.success);" +
    "}")
  // ...
NOTE

The Saved event does not fire if the document saving is implemented on the client side (the handled property is set to true).

See Save a Document for more information.

See Also