forked from lxm_front/Mergely
* removed editor and initial cleanup * cleanup * updated jquery * tidy up * moved src and build to lib * tidy up and fixed webpack * updated readme * removed junk * tidy up * works with sample and editor * removed editor_width and editor_height * auto width and height * added license feature * not doing dist * fixed typo * added searchcursor * fixed typo * doc updates * improved comment * updated init for cm settings * fixed jquery/cm includes * documentation updates * updated changes doc * fixed cmsettings * updated examples
52 lines
1.8 KiB
HTML
52 lines
1.8 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 type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
|
|
|
<!-- Requires CodeMirror -->
|
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.32.0/codemirror.min.js"></script>
|
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.32.0/addon/search/searchcursor.min.js"></script>
|
|
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.32.0/codemirror.min.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 () {
|
|
$('#mergely').mergely({
|
|
license: 'lgpl',
|
|
cmsettings: {
|
|
readOnly: true
|
|
},
|
|
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 class="mergely-full-screen-8">
|
|
<div class="mergely-resizer">
|
|
<div id="mergely">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|