Monday, 4 March 2019

Compare text notes(diff) with angular 6

I'm working on an angular 6 project for text comparisons.

Basically I have two text strings, and I'm using the 'CanvasRenderingContext2D' object in order to draw them on a specific x-y coordinates.

e.g -

Is there any out of the box tool which can help me with running and presenting text diff on these lines? (assuming there are only two lines in the box so normal diff algorithm should suffice).

I came across this - https://github.com/kpdecker/jsdiff and managed to use it as a standalone program, but couldn't figure on how to integrate such thing to an angular project and writing the colored text using the CanvasRenderingContext2D.fillText()

Thanks.



from Compare text notes(diff) with angular 6

No comments:

Post a Comment