mirror of
https://github.com/wickedest/Mergely.git
synced 2026-02-02 09:38:00 +08:00
Build improvements (#73)
* 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
This commit is contained in:
@@ -12,11 +12,12 @@ This example demonstrates how to set left and right editors using ajax.
|
||||
<meta name="author" content="Jamie Peabody" />
|
||||
|
||||
<!-- Requires jQuery -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script>
|
||||
<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="../lib/codemirror.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../lib/codemirror.css" />
|
||||
<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>
|
||||
@@ -111,7 +112,7 @@ This example demonstrates how to set left and right editors using ajax.
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="width: 100%;">
|
||||
<body style="width: 100%; margin: 0;">
|
||||
<table style="width: 100%;"><tr>
|
||||
<td style="width: 50%;"><div id="drop_zone" class="drop_zone">Drop files here</div></td>
|
||||
<td style="width: 50%;"><input type="checkbox" id="ignorews">ignore witespaces</td>
|
||||
@@ -123,8 +124,10 @@ This example demonstrates how to set left and right editors using ajax.
|
||||
<td style="width: 50%;"><tt id="path-rhs"></tt> <a id="save-rhs" class="save-link" href="#">save</a></td>
|
||||
</tr></table>
|
||||
|
||||
<div id="mergely-resizer" style="height: 450px;">
|
||||
<div id="compare">
|
||||
<div style="height: 450px; width: 100%;">
|
||||
<div class="mergely-resizer">
|
||||
<div id="compare">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -12,21 +12,24 @@ This example demonstrates the minimum amount of code required to use Mergely.
|
||||
<meta name="author" content="Jamie Peabody" />
|
||||
|
||||
<!-- Requires jQuery -->
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script>
|
||||
|
||||
<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="../lib/codemirror.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../lib/codemirror.css" />
|
||||
|
||||
<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 () {
|
||||
$('#compare').mergely({
|
||||
cmsettings: { readOnly: false },
|
||||
<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');
|
||||
},
|
||||
@@ -38,11 +41,11 @@ This example demonstrates the minimum amount of code required to use Mergely.
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="mergely-resizer">
|
||||
<div id="compare">
|
||||
<div class="mergely-full-screen-8">
|
||||
<div class="mergely-resizer">
|
||||
<div id="mergely">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -12,22 +12,24 @@ This example demonstrates how to enable line wrapping
|
||||
<meta name="author" content="Jamie Peabody" />
|
||||
|
||||
<!-- Requires jQuery -->
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script>
|
||||
|
||||
<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="../lib/codemirror.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../lib/codemirror.css" />
|
||||
|
||||
<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 () {
|
||||
$(document).ready(function () {
|
||||
$('#compare1').mergely({
|
||||
width: 'auto',
|
||||
height: 200,
|
||||
license: 'lgpl-separate-notice',
|
||||
cmsettings: {
|
||||
readOnly: false,
|
||||
lineWrapping: true,
|
||||
@@ -36,6 +38,7 @@ This example demonstrates how to enable line wrapping
|
||||
$('#compare2').mergely({
|
||||
width: 'auto',
|
||||
height: 200,
|
||||
license: 'lgpl-separate-notice',
|
||||
cmsettings: {
|
||||
readOnly: false,
|
||||
lineWrapping: true,
|
||||
@@ -44,6 +47,7 @@ This example demonstrates how to enable line wrapping
|
||||
$('#compare3').mergely({
|
||||
width: 500,
|
||||
height: 200,
|
||||
license: 'lgpl-separate-notice',
|
||||
cmsettings: {
|
||||
readOnly: false,
|
||||
lineWrapping: true,
|
||||
@@ -52,6 +56,7 @@ This example demonstrates how to enable line wrapping
|
||||
$('#compare4').mergely({
|
||||
width: 500,
|
||||
height: 200,
|
||||
license: 'lgpl-separate-notice',
|
||||
cmsettings: {
|
||||
readOnly: false,
|
||||
lineWrapping: true,
|
||||
@@ -61,6 +66,7 @@ This example demonstrates how to enable line wrapping
|
||||
width: 'auto',
|
||||
height: 200,
|
||||
autoresize: false,
|
||||
license: 'lgpl-separate-notice',
|
||||
cmsettings: {
|
||||
readOnly: false,
|
||||
lineWrapping: true,
|
||||
|
||||
Reference in New Issue
Block a user