Get new jQuery plugins just once a week
February 18, 2013
PrettyTextDiff | jQuery plugin to for visual diff of text
PrettyTextDiff is a wrapper jQuery plugin to produce a visual diff of text. A visual diff makes it easy for the user to understand what exactly changed with a quick scan.
You can customizee this jquery plugin by :-
- originalContainer : CSS-selector for the element that holds the original text. $(elem).text() will be used to extract the text.
- changedContainer : CSS-selector for the element that holds the changed text. $(elem).text() will be used to extract the text.
- diffContainer : CSS-selector for the element where the diff will be put.
- cleanup : Whether diff_match_patch’s diff_cleanupSemantic() will be used or not. true will produce a human-redable diff, whereas false will be more to the liking of machines. See the demo for the effect.
- debug : see some debug output in your browser’s console.
Created by Arnab Deka
Sign up for our weekly newsletter.