08/12
2016
A simple text differences visualization library
TextDiff is a simple library for text differences visualization. Based on Wordpress's Compare Revisions., (*1)
, (*2)
composer require qazd/text-diff
git clone https://github.com/qazd/text-diff.git
<html> <head> <title>TextDiff</title> <link rel="stylesheet" type="text/css" href="vendor/qazd/text-diff/css/style.css"> </head> <body> <?= $table ?> </body> </html>
TextDiff::render()
is the only available method. With the third argument set to false
you can disable split view., (*3)
If you won't use Composer - just require src/TextDiff.php
, (*4)
Integrate css/style.css
into your page to style the comparison table., (*5)