Skip to main content
A newer version of this page is available. .
JS

RichEditBuilder.OnSaved(String) Method

Allows you to perform custom actions after a document is saved.

Namespace: DevExpress.AspNetCore.RichEdit

Assembly: DevExpress.AspNetCore.RichEdit.v19.2.dll

Declaration

public RichEditBuilder OnSaved(
    string callback
)

Parameters

Name Type Description
callback String

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

Returns

Type Description
RichEditBuilder

An object that can be used to further configure the Rich Text Editor.

Remarks

Use the OnSaved method to perform custom actions after a server tried to save a document.

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 Also