Track Changes between two contents initially.

1 posts, 0 answers
  1. Mangesh
    Mangesh avatar
    16 posts
    Member since:
    Sep 2011

    Posted 19 Sep 2014 Link to this post


    I wanted to show changes between two contents from database initially on RadEditor. For this purpose, I have used DiffEngine class and .GetDiffs method to implement difference between two contents. It's working in following way,

    For e.g. If

    string content1 = "<h1> This is Header </h1>";
    string content2 = "<h1> This is Headerssss </h1>";
    DiffEngine diff = new DiffEngine();
    string result = diff.GetDiffs(content2, content1);

    // output of result using GetDiffs method is = "<h1> This is <span class="diff_deleted">Header </span><span class="diff_new">Headerssss </span></h1>";
    // Expected output is = "<h1> This is Header<span class="diff_new">ssss </span></h1>";

    As you can see that in content2, only ssss has been added to content1.
    Can we achieve such functionality in RadEditor or using DiffEngine class?

Back to Top