RadEditor TrackChanges: Duplicate Reformat Actions on B/I/U and How to Disable Them

1 Answer 6 Views
Editor
Emin Sadigov
Top achievements
Rank 2
Iron
Iron
Iron
Emin Sadigov asked on 03 Jul 2025, 10:20 AM

Hello,

In the demo (https://demos.telerik.com/aspnet-ajax/editor/examples/trackchanges/defaultcs.aspx):

  1. When I click the B/I/U buttons, the editor logs multiple Reformat actions and repeatedly applies the B/I/U tags. How can I prevent this?

  2. Is there a way to disable Reformat actions in Track Changes mode? I only need to track insertions (ins) and deletions (del).

Thank you!

 

 

 

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 03 Jul 2025, 11:42 AM

Hi Emin,

In Track Changes mode, using the Bold, Italic, or Underline (B/I/U) buttons in RadEditor logs "Reformat" actions for each formatting change. This is the expected, built-in behavior. The editor tracks all formatting changes as "Reformat" actions so that users can review every modification, not just insertions or deletions.

There is currently no built-in setting or property to disable only "Reformat" actions while still tracking insertions and deletions. The Track Changes module is designed to log all types of changes, including formatting, to ensure a complete revision history.

Possible workaround

Custom Client-Side Logic: Preventing "Reformat" actions specifically would require custom client-side code. However, the Track Changes feature is tightly integrated with the editor’s command system, and overriding this behavior is complex and not officially supported. There is no straightforward or documented approach to intercept and suppress only "Reformat" actions while keeping insertions and deletions tracked. What you can do is to disable the Bold, Italic and Underline commands like this:

<script>
    function OnClientCommandExecuting(sender, args) {
        if (args.get_commandName() === 'Bold' || args.get_commandName() === 'Italic' || args.get_commandName() === 'Underline') {
            args.set_cancel(true);
        }
    }
</script>
<telerik:RadEditor RenderMode="Lightweight" ID="theEditor" OnClientCommandExecuting="OnClientCommandExecuting" EnableTrackChanges="true" ...

    Regards,
    Rumen
    Progress Telerik

    Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources
    Tags
    Editor
    Asked by
    Emin Sadigov
    Top achievements
    Rank 2
    Iron
    Iron
    Iron
    Answers by
    Rumen
    Telerik team
    Share this question
    or