diff --git a/README.md b/README.md index c389089..9d4dacd 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,14 @@ Import the stylesheet and the library code It will now be available as a global variable named `Diff2Html`. +```js +var diffHtml = Diff2Html.getPrettyHtml( + '', + {inputFormat: 'diff', showFiles: true, matching: 'lines', outputFormat: 'side-by-side'} +); +document.getElementById("destination-elem-id").innerHTML = diffHtml; +``` + ### Node Module ```js