chore(doc): Update CDN example
This commit is contained in:
41
examples/cdn.html
Normal file
41
examples/cdn.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Mergely - Example full page 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">
|
||||
|
||||
<!-- Mergely -->
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mergely/5.0.0/mergely.min.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mergely/5.0.0/mergely.css" />
|
||||
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.12/codemirror.min.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.12/codemirror.css" />
|
||||
|
||||
<style type="text/css">
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
#compare {
|
||||
height: inherit;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="compare"></div>
|
||||
|
||||
<script>
|
||||
const mergely = new Mergely('#compare');
|
||||
mergely.once('updated', () => {
|
||||
mergely.lhs('the quick red fox\njumped over the hairy dog');
|
||||
mergely.rhs('the quick brown fox\njumped over the lazy dog');
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -21,6 +21,9 @@ This example demonstrates the minimum amount of code required to use Mergely.
|
||||
<h1>Examples</h1>
|
||||
|
||||
<dl>
|
||||
<dt><a href="cdn.html">cdn.html</a></dt>
|
||||
<dd>Demonstrates how to use Mergely with CDN.</dd>
|
||||
|
||||
<dt><a href="editor.html">editor.html</a></dt>
|
||||
<dd>An example editor showcasing some of Mergely's API features.</dd>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user