This is a migrated thread and some comments may be shown as answers.

Quick/Easy Question about TrackChanges

1 Answer 18 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Craig
Top achievements
Rank 1
Craig asked on 12 Apr 2019, 06:32 PM

I am building a page where multiple users collaborate on writing a document.  But I want to check to be sure that all changes have been accepted or rejected prior to submitting the document for approval.  Is there a client-side method that will tell me that, or do I just need to write a quick method that looks for the pending changes tags?  I don't mind writing it, as it wouldn't be difficult, but I'm just hoping that there is a more native solution.

 

Something like below:

if (RadEditor.hasPendingChanges() == false)
{
     AllowSubmit();
}else{
     RejectSubmit();
}

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 17 Apr 2019, 11:56 AM

Hi Craig,

The Track Changes feature gives you the following built-in client-side methods:

  • get_htmlAcceptChanges() - returns HTML content as if Accept All Track Changes is fired.
  • get_htmlRejectChanges() - returns HTML content as if Reject All Track Changes is fired.
  • set_enableTrackChangesOverride() - pass true to prevent the editor from tracking the changes. Useful when you want the user to be able to track changes, but only after clicking the button on the toolbar (see the example below). Pass false to have the editor start tracking changes.
  • get_enableTrackChangesOverride() - returns whether the tracking changes are paused when the user types. When true is returned, changes are not tracked.

You can implement your own validation mechanism by using the above methods.

Best regards,

Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Editor
Asked by
Craig
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or