aspnetcore-js-devexpress-dot-richedit-0b00b7b4.md
An event that occurs when a document layout is formatted.
export class DocumentFormattedEvent extends RichEditEvent<DocumentFormattedEventArgs>
You can define the DocumentFormatted event handler either at the server side, at the client side, or at runtime.
Use the OnDocumentFormatted(String) method to specify the event handler.
@(Html.DevExpress().RichEdit("richEdit")
.OnDocumentFormatted("function(s,e) {
console.log('The document contains ' + e.pageCount + ' page(s).');
}")
// ...
Use the documentFormatted property to specify the event handler.
const options = DevExpress.RichEdit.createOptions();
options.events.documentFormatted = function(s,e) {
console.log('The document contains ' + e.pageCount + ' page(s).');
};
The documentFormatted property provides access to the addHandler(handler), removeHandler(handler), and clearHandlers methods that allow you to dynamically add and remove event handlers.
richEdit.events.documentFormatted.addHandler(function(s, e) {
console.log('The document contains ' + e.pageCount + ' page(s).');
});
The event handler receives an argument of the DocumentFormattedEventArgs type. The argument’s properties provide information specific to this event.
Event<TSource, TEventArgs> RichEditEvent<TEventArgs> DocumentFormattedEvent
See Also