aspnetcore-js-devexpress-dot-richedit-bdea5662.md
An event that occurs if any change is made in the document.
export class DocumentChangedEvent extends RichEditEvent<EventArgs>
You can define the DocumentChanged event handler either at the server side, at the client side, or at runtime.
Use the OnDocumentChanged(String) method to specify the event handler.
@(Html.DevExpress().RichEdit("richEdit")
.OnDocumentChanged("function(s,e) {
console.log('The document has been changed.');
}")
// ...
Use the documentChanged property to specify the event handler.
const options = DevExpress.RichEdit.createOptions();
options.events.documentChanged = function(s,e) {
console.log('The document has been changed.');
};
The documentChanged property provides access to the addHandler(handler), removeHandler(handler), and clearHandlers methods that allow you to dynamically add and remove event handlers.
richEdit.events.documentChanged.addHandler(function(s, e) {
console.log('The document has been changed.');
});
The event handler receives an argument of the EventArgs type.
Event<TSource, TEventArgs> RichEditEvent<TEventArgs> DocumentChangedEvent
See Also