diff --git a/examples/ajax.html b/examples/ajax.html index e3ac86d..d8b8621 100644 --- a/examples/ajax.html +++ b/examples/ajax.html @@ -8,137 +8,124 @@ This example demonstrates how to set left and right editors using ajax. - + - + - - - + + + - - - -
Drop files here
ignore witespaces
-
+
+ + + + + + +
- - - -
  save   save
+
+ + save + + + save + +
-
+
-
- Changes: 0 added lines, - 0 deleted lines, - 0 changed lines -
+
diff --git a/examples/app.js b/examples/app.js index a65b4a3..a61390a 100644 --- a/examples/app.js +++ b/examples/app.js @@ -2,6 +2,8 @@ require('codemirror/addon/selection/mark-selection.js'); require('codemirror/lib/codemirror.css'); require('../src/mergely.css'); +const macbeth = require('../test/data/macbeth'); + const lhs = `\ the quick red fox jumped over the hairy dog @@ -21,14 +23,20 @@ document.onreadystatechange = function () { license: 'lgpl', ignorews: true, wrap_lines: true, + change_timeout: 0, cmsettings: { readOnly: false }, lhs: function(setValue) { - setValue(lhs); + setValue(macbeth.join('\n')); + // setValue(lhs); }, rhs: function(setValue) { - setValue(rhs); - } + setValue(macbeth.join('\n') + .replace(/love/g,'bleed') + .replace(/heart/g, 'penis')); + // setValue(rhs); + }, + _debug: 'change,scroll' }); }; diff --git a/examples/index.html b/examples/index.html new file mode 100644 index 0000000..968af2a --- /dev/null +++ b/examples/index.html @@ -0,0 +1,24 @@ + + + + + Mergely - Simple Example + + + + + + + + + + diff --git a/examples/simple.html b/examples/simple.html index ebdcd76..8cead5a 100644 --- a/examples/simple.html +++ b/examples/simple.html @@ -8,40 +8,41 @@ This example demonstrates the minimum amount of code required to use Mergely. - + - + - - - + + +
-
-
+