A React.js (v18) component for Mergely (v5) that is used for differencing and merging files interactively in a browser (diff/merge), providing rich API that enables you to easily integrate Mergely into your existing web application. It is suitable for comparing text files online, for example, .txt, .html, .xml, .c, .cpp, .java, etc.
npm install mergely-react
<MergelyView height="400px" ignorews lhs="I like apples!" rhs="I like bananas!" />
All configuration options can be found on https://mergely.com/doc. In addition to those options, the following can be configured:
||The height of the editor. Supports CSS height units.|
||Triggered when one of the editors change, e.g. text was altered.|
||Triggered once, after editor is resized and initial document changes are rendered.|
||Triggered after the editor is resized.|
||Triggered after the editor finishes rendering. For example, text updates, options, or scroll events may trigger renders.|
Mergely is distributed under the GPL, LGPL and MPL open source licenses.
Commercial licenses are available (see https://mergely.com/license).