aspnetcore-js-devexpress-dot-richedit-992a0b53.md
An event that occurs when content is removed from the document.
export class ContentRemovedEvent extends RichEditEvent<ContentRemovedEventArgs>
You can define the ContentRemoved event handler either at the server side, at the client side, or at runtime.
Use the OnContentRemoved(String) method to specify the event handler.
@(Html.DevExpress().RichEdit("richEdit")
.OnContentRemoved("function(s,e) {console.log('The removed text is: ' + e.removedText);}")
// ...
Use the contentRemoved property to specify the event handler.
const options = DevExpress.RichEdit.createOptions();
options.events.contentRemoved = function(s,e) {
console.log('The removed text is: ' + e.removedText);
};
The contentRemoved property provides access to the addHandler(handler), removeHandler(handler), and clearHandlers methods that allow you to dynamically add and remove event handlers.
richEdit.events.contentRemoved.addHandler(function(s, e) {
console.log('The removed text is: ' + e.removedText);
});
The event handler receives an argument of the ContentRemovedEventArgs type. The argument’s properties provide information specific to this event.
Event<TSource, TEventArgs> RichEditEvent<TEventArgs> ContentRemovedEvent
See Also