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

Issues with DiffEngine

8 Answers 98 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Trevor
Top achievements
Rank 1
Trevor asked on 19 Jan 2015, 07:19 PM
We're using the DiffEngine component to identify changes between saved versions of the Editor content.  These version changes must then be approved by a Content Approver (user). There are two problematic scenarios we have encountered.

Scenario 1:

version 1 html:  <a title="xxx" href="http://wwww.test.com/xxxxx.pdf">a link</a>
version 2 html:  <a title="yyyy" href="http://wwww.test.com/yyyyyyy.pdf">a link</a>

The DiffEngine reports no differences in these two HTML snippets. This is a major problem for us. The linked document (href) was changed and the "title" content was changed; we need for these changes to be identified so they can be approved by the Content Approver user.


Scenario 2:

version 1 html:  <img src="http://demos.telerik.com/aspnet-ajax/editor/images/editor.jpg" alt="telerik" />
version 2 html:  <img src="http://demos.telerik.com/aspnet-ajax/editor/images/editor.jpg" alt="telerik">

The DiffEngine reports a difference in these two html snippets, despite the fact that only the closing tag changed.

Here's the output of the DiffEngine:

<table class="diff_deleted"><tr><td><img src="http://demos.telerik.com/aspnet-ajax/editor/images/editor.jpg" alt="telerik" /></td></tr></table><table class="diff_new"><tr><td><img src="http://demos.telerik.com/aspnet-ajax/editor/images/editor.jpg" alt="telerik"></td></tr></table>


Scenario 2 is more of a nuisance, but it would be nice if the DiffEngine would ignore something as trivial as a closing tag change.

Scenario 1 is a show-stopper for us.  It is possible to have the DiffEngine identify the changed href and the changed title in this scenario?

Thanks,
Trevor.


8 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 21 Jan 2015, 12:24 PM
Hello Trevor,

Could you please provide more details how the RadEditor control is related to the encountered issues? If this is a custom solution, I am unable to define how the RadEditor is responsible for the troubles with the results of the implemented DiffEngine.

Regards,
Ianko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Trevor
Top achievements
Rank 1
answered on 21 Jan 2015, 02:57 PM
Hi Ianko,

I'm puzzled by your response. Do you not support the DiffEngine?

I also don't know what you mean by "custom solution".... here's the code:

Dim de As Telerik.Web.UI.Editor.Diff.DiffEngine = New Telerik.Web.UI.Editor.Diff.DiffEngine()
Dim diffs As String = de.GetDiffs(updated, baseline)

We purchased this product from you, and I assumed it was included in our support contract.  Am I mistaken?  Or have posted in the wrong forum?




0
Trevor
Top achievements
Rank 1
answered on 21 Jan 2015, 03:20 PM
Additionally, the same problems may be seen in the Track Changes Dialog.
0
Ianko
Telerik team
answered on 22 Jan 2015, 09:45 AM
Hello Trevor,

Sorry for the confusion, I thought that you are using a third-party or a custom DiffEngine instead of the built-in, which is actually obsolete.

The discontinued Track Changes dialog is replaced by the Track Changes functionality. All functionality related to the old, non-supported dialog is still available due to legacy matters, but not support.

Also, by design the DiffEngine is seeking changes as text and attribute-related differences are not tracked.

On a side note, the used DiffEngine is not a Telerik product. It is a third party source, which can be found here - http://www.mathertel.de/Diff/. I suggest following the provided site for further improvements and for using this functionality as a third-party solution.

Regards,
Ianko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Trevor
Top achievements
Rank 1
answered on 22 Jan 2015, 04:51 PM
Thanks for the info.

However, I don't think the newer Track Changes functionality contains the same functionality as the Track Changes dialog.

With the newer Track Changes functionality, how can I show differences between two saved versions of editor content?

Example: User_A creates editor content, it is saved to the db. User_B loads the existing content, makes changes, saves it. How does User_C see the changes that User_B made?

With the Track Changes dialog, this was possible. How do I achieve this with the newer Track Changes functionality, which replaces the dialog?

0
Ianko
Telerik team
answered on 24 Jan 2015, 08:23 AM
Hi Trevor,

there is the highlighting that the new Track Changes functionality provides. It works similar to the Track Changes in MS Word. 

You just need to ensure that the first creator's role is with disabled TrackChangesOveride. Examine this screencast, in which I am demonstrating a similar situation with the Track Changes demo.

Regards,
Ianko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Trevor
Top achievements
Rank 1
answered on 27 Jan 2015, 07:39 PM
Hi Ianko,

Thanks for taking the time to prepare the screencast.

However, we don't want User_A or User_B to see the 'track changes' highlighting. This is the functionality we have now with the older Track Changes dialog:  User_A enters content, saves, User_B enters content, saves - neither user sees 'track changes' highlighting in the editor - and finally User_C can observe the changes made by User_B by using the Track Changes dialog to compare the two versions.

Not only do we not want User_A and User_B to see the 'track changes' highlighting, but we don't want to save the content that includes the 'track changes' markup to the db, which I believe we would have to do in your example.

Is it possible to achieve this with the new Track Changes functionality? Essentially, we would need to assign two versions of content to the editor, and then have it highlight the changes between those versions.

0
Ianko
Telerik team
answered on 29 Jan 2015, 07:18 AM
Hello Trevor,

The TrackChanges dialog is not designed to support two instances of content. This is an MS Word-inspired Track Changes functionality.

What you are seeking is a rather custom solution to preserve content in DB and later compare it. Well, as told, you can use the third-party DiffEngine and improve its functionality as per to your requirements. The RadEditor control does not expose an automated logic which could help you on creating a functionality to compare text.
 
Regards,
Ianko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Editor
Asked by
Trevor
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Trevor
Top achievements
Rank 1
Share this question
or