When EnableTrackChanges = true and after the user makes changes ..... and Accept All Track Changes or Reject All Track Changes a popup window is displayed. How do i disable or hide the popup windows?
thanks in advance
5 Answers, 1 is accepted
Hi Diane,
Here is an example on how to skip the choice-related popup step:
<script>
function OnClientCommandExecuted(sender, args) {
if (args.get_commandName() == "AcceptAllTrackChanges") {
setTimeout(function () {
console.log($telerik.$(".rePopupContainer .rePopupButton.ok").click());
}, 0);
}
else if (args.get_commandName() == "RejectAllTrackChanges") {
setTimeout(function () {
console.log($telerik.$(".rePopupContainer .rePopupButton.ok").click());
}, 0);
}
}
</script>
<telerik:RadEditor RenderMode="Lightweight" ID="theEditor" EnableTrackChanges="true" runat="server" Width="750px"
Height="400px" OnClientCommandExecuted="OnClientCommandExecuted">
<Tools>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="AcceptAllTrackChanges" />
<telerik:EditorTool Name="RejectAllTrackChanges" />
</telerik:EditorToolGroup>
</Tools>
<TrackChangesSettings Author="RadEditorUser" CanAcceptTrackChanges="true" UserCssId="reU0"></TrackChangesSettings>
</telerik:RadEditor>
Another approach is to override the command's logic and change the way changes are accepted:
<telerik:RadEditor runat="server" ID="RadEditor1" EnableTrackChanges="true">
<Tools>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="AcceptAllTrackChanges" />
<telerik:EditorTool Name="RejectAllTrackChanges" />
</telerik:EditorToolGroup>
</Tools>
<TrackChangesSettings Author="RadEditorUser" CanAcceptTrackChanges="true" UserCssId="reU0"></TrackChangesSettings>
</telerik:RadEditor>
<script>
Telerik.Web.UI.Editor.CommandList.AcceptAllTrackChanges = function (commandName, editor, args) {
Telerik.Web.UI.Editor.TrackChanges.setEditor(editor);
Telerik.Web.UI.Editor.TrackChanges.acceptAllChangesSilently();
return true;
};
</script>
Note that the script should be always the RadEditor declaration so that the namespace and the command to be initialized on the client properly before compiling the override.
Regards,
Rumen
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.

Thank You Rumen .... the 1st option will work best in my case ... however it doesn't take care of the 2nd popup (confirmation) ... i don't want any popups to be display ....
You are welcome, Diane!
You can find below an improved version of the second approach that covers the Reject option too - works without any popups - Enjoy:
<telerik:RadEditor runat="server" ID="RadEditor1" EnableTrackChanges="true">
<Tools>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="AcceptAllTrackChanges" />
<telerik:EditorTool Name="RejectAllTrackChanges" />
</telerik:EditorToolGroup>
</Tools>
<TrackChangesSettings Author="RadEditorUser" CanAcceptTrackChanges="true" UserCssId="reU0"></TrackChangesSettings>
</telerik:RadEditor>
<script>
Telerik.Web.UI.Editor.CommandList.AcceptAllTrackChanges = function (commandName, editor, args) {
Telerik.Web.UI.Editor.TrackChanges.setEditor(editor);
Telerik.Web.UI.Editor.TrackChanges.acceptAllChangesSilently();
return true;
};
Telerik.Web.UI.Editor.CommandList.RejectAllTrackChanges = function (commandName, editor, args) {
Telerik.Web.UI.Editor.TrackChanges.setEditor(editor);
Telerik.Web.UI.Editor.TrackChanges.rejectAllChangesSilently();
return true;
};
</script>
Regards,
Rumen
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.

Great! I am glad that everything is fine! Keep up the good work :)
Regards,
Rumen
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.