forked from lxm_front/Mergely
51 lines
1.7 KiB
HTML
51 lines
1.7 KiB
HTML
<!--
|
|
This example demonstrates the minimum amount of code required to use Mergely.
|
|
-->
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" /><title>Mergely - Simple Example</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="Merge and Diff your documents with diff online and share" />
|
|
<meta name="keywords" content="diff,merge,compare,jsdiff,comparison,difference,file,text,unix,patch,algorithm,saas,longest common subsequence" />
|
|
<meta name="author" content="Jamie Peabody" />
|
|
|
|
<!-- Requires jQuery -->
|
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
|
|
<!-- Optional jquery.corner for rounded buttons -->
|
|
<script src="jquery.corner.js" type="text/javascript"></script>
|
|
|
|
<!-- Requires CodeMirror 2.16 -->
|
|
<script type="text/javascript" src="../lib/codemirror.js"></script>
|
|
<link type="text/css" rel="stylesheet" href="../lib/codemirror.css" />
|
|
|
|
<!-- Requires Mergely -->
|
|
<script type="text/javascript" src="../lib/mergely.js"></script>
|
|
<link type="text/css" rel="stylesheet" href="../lib/mergely.css" />
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function () {
|
|
$('#compare').mergely({
|
|
cmsettings: { readOnly: false },
|
|
lhs: function(setValue) {
|
|
setValue('the quick red fox\njumped over the hairy dog');
|
|
},
|
|
rhs: function(setValue) {
|
|
setValue('the quick brown fox\njumped over the lazy dog');
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<div id="mergely-resizer">
|
|
<div id="compare">
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|