Skip to content

A 3 way diff/merging wrapper for Ace Editor forked from ace-diff

License

Notifications You must be signed in to change notification settings

slimjimsoftware/ace-diff3

 
 

Repository files navigation

Ace-diff3

This is a wrapper for Ace Editor to provide a 3-panel diffing/merging tool that visualizes differences in three documents and allows users to copy changes between them.

It's based on a fork of Ace Diff and built on top of google-diff-match-patch library. That lib handles the hard part: the computation of the document diffs. Ace-diff 3 just visualizes that information as line-diffs in the editors.

How to Install

yarn && yarn build

Copy the files from dist/ into your project.

HTML

<div class="acediff3"></div>

JavaScript

Here's an example of how you'd instantiate AceDiff3.

const differ = new AceDiff3({
  ace: window.ace, // You Ace Editor instance
  element: '.acediff3',
  left: {
    content: 'your local file content here',
  },
  common: {
    content: 'your base file content here',
  },
  right: {
    content: 'your incoming file content here',
  },
});

Everything else is the same as Ace Diff - See the Ace Diff Source for information.

License

MIT.

About

A 3 way diff/merging wrapper for Ace Editor forked from ace-diff

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 95.2%
  • SCSS 4.8%