Skip to main content

ASPxClientRichEdit.DocumentChanged Event

Fires if any change is made to the RichEdit’s document on the client.


DocumentChanged: ASPxClientEvent<ASPxClientEventHandler<ASPxClientRichEdit>>

Event Data

The DocumentChanged event's data class is ASPxClientEventArgs.


Note that the DocumentChanged event only notifies about any client change made in the RichEdit’s document.

The RichEdit synchronizes the document model between the client and server parts. You can handle the BeginSynchronization and EndSynchronization events to be informed about the synchronization status.

var bookmarkCache = [];  
function onInit(s, e) {  
    bookmarkCache = s.document.activeSubDocument.bookmarksInfo;  

function onDocumentChanged(s, e) {  
    var currentBookmarks = s.document.activeSubDocument.bookmarksInfo;  
    var currentIndex = findBookmarkIndex(currentBookmarks, "bookmark")  
    if (currentIndex != -1) {  
        var indexCache = findBookmarkIndex(bookmarkCache, "bookmark");  
        if (indexCache == -1) {  
            bookmarkCache = currentBookmarks;  
            setBookmarkColor(currentBookmarks[currentIndex], "red");  
See Also