forked from lxm_front/Mergely
45 lines
1.4 KiB
HTML
45 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>Mergely - Example fixed height editor</title>
|
|
<meta http-equiv="X-UA-Compatible" content="chrome=1, IE=edge">
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
|
<meta name="description" content="" />
|
|
<meta name="keywords" content="mergely,diff,merge,compare" />
|
|
<meta name="author" content="Jamie Peabody" />
|
|
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
|
|
|
<!-- CodeMirror peer dependency -->
|
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.0/codemirror.min.js"></script>
|
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.0/addon/search/searchcursor.min.js"></script>
|
|
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.0/codemirror.min.css" />
|
|
|
|
<!-- Mergely -->
|
|
<link type="text/css" rel="stylesheet" href="/lib/mergely.css" />
|
|
<script type="text/javascript" src="/lib/mergely.js"></script>
|
|
|
|
<style type="text/css">
|
|
html, body {
|
|
margin: 0;
|
|
}
|
|
#compare {
|
|
height: 300px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="compare"></div>
|
|
|
|
<script>
|
|
const doc = new Mergely('#compare', {
|
|
license: 'lgpl'
|
|
});
|
|
doc.once('updated', () => {
|
|
doc.lhs('the quick red fox\njumped over the hairy dog');
|
|
doc.rhs('the quick brown fox\njumped over the lazy dog');
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|