1.0.3 • Published 1 year ago

mergely-react v1.0.3

Weekly downloads
-
License
(GPL-3.0 OR LGPL-...
Repository
-
Last release
1 year ago

mergely-react

mergely logo

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.

Installation

npm install mergely-react

Example

<MergelyView
    height="400px"
    ignorews
    lhs="I like apples!"
    rhs="I like bananas!"
/>

Configuration

All configuration options can be found on https://mergely.com/doc. In addition to those options, the following can be configured:

OptionTypeDefault valueDescription
heightstring'400px'The height of the editor. Supports CSS height units.
onChangedfunction ()Triggered when one of the editors change, e.g. text was altered.
onInitfunction ()Triggered once, after editor is resized and initial document changes are rendered.
onResizedfunction ()Triggered after the editor is resized.
onUpdatedfunction ()Triggered after the editor finishes rendering. For example, text updates, options, or scroll events may trigger renders.

License

Mergely is distributed under the GPL, LGPL and MPL open source licenses.

Commercial licenses are available (see https://mergely.com/license).

1.0.3

1 year ago

1.0.3-alpha.1

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago