We constantly improve Telerik’s ASP.NET AJAX Editor control with new features requested by our clients. In the Q2 2012 beta release we added a sneak peek of its new Track Changes functionality. It resembles the idea of track changes in MS Word®, so I suppose all of you know what it is and how it behaves. Still, let’s take a look at how you can put it to good use.
For those of you who are not familiar with this - any change in the content area (inserting, pasting, deleting or applying formatting to the content) is tracked. Content that is added is colored and is underlined (added); deleted content is marked with a strike-through line (
deleted) and modified formatting is wrapped with vertical bars (|formatted|). In addition, a tooltip and a little popup with information about the applied change will appear at the bottom right corner of the browser:
Tracking is enabled by default, so any changes you make will be noted. You can disable it by clicking the Enable Track Changes Override button. When tracking is disabled you can still modify the content, but it will not be highlighted and the rest of your team will not have a visual indication. Once the author is done with the desired modifications he/she can accept the selected changes via the Accept Track Change button. To make things faster there is also the Accept All Track Changes button which automatically accepts all the changes. Alternatively, if you are not happy with the modifications you can reject the selected change and revert to the old content by using the Reject Track Change button (or the Reject All Track Changes for all of them at once).
The developer can control the user’s permissions according to his/her role in the system to make the feature more flexible. For example, beginner authors can have their Accept rights revoked or the Accept buttons removed so that the highlighted content is always submitted to the server for the senior staff to review). The user name is set via the Author property of the TrackChangesSettings inner tag and the CanAcceptTrackChanges property controls whether the user can accept changes.
In order for the changes to persist across server requests, additional markup is added to denote the places and formatting applied, e.g.
Markup of newly inserted content:
You can test the Track Changes feature and see how to configure it in the following live demo: TrackChanges.
With the official Q2 2012 release, the track changes feature supports the following RadEditor commands:
Check it out and let us know what you think – you can use the community forums, the online support system or just add a comment below. If you want to see other commands added to this list be sure to tell us, because the requests we receive will determine the priority of its implementation. Any additional feedback and suggestions are most welcome as well, for example share a real-life scenario you would use the feature in.
Iana Tsolova is Product Manager at Telerik’s DevTools division. She joined the company back in the beginning of 2008 as a Support Officer and has since occupied various positions at Telerik, including Senior Support Officer, Team Lead at one of the ASP.NET AJAX teams and Technical Support Director. Iana’s main interests are web development, reading articles related to geography, wild nature and latest renewable energy technologies.
Subscribe to be the first to get our expert-written articles and tutorials for developers!