diff --git a/Examples/Ace/index.html b/Examples/Ace/index.html new file mode 100644 index 00000000..a320edcd --- /dev/null +++ b/Examples/Ace/index.html @@ -0,0 +1,22 @@ + + +
+ + + + + + + + + + + diff --git a/Examples/Ace/index.js b/Examples/Ace/index.js new file mode 100644 index 00000000..111ea354 --- /dev/null +++ b/Examples/Ace/index.js @@ -0,0 +1,28 @@ +/* global Y, ace */ + +// initialize a shared object. This function call returns a promise! +Y({ + db: { + name: 'memory' + }, + connector: { + name: 'websockets-client', + room: 'ace-example-dev' + // debug: true + // url: 'http://127.0.0.1:2345' + }, + sourceDir: '/bower_components', + share: { + ace: 'Text' // y.share.textarea is of type Y.Text + } +}).then(function (y) { + window.y = y + + // bind the textarea to a shared text element + var editor = ace.edit('editor') + editor.setTheme('ace/theme/monokai') + editor.getSession().setMode('ace/mode/javascript') + + y.share.ace.bindAce(editor) + // thats it.. +}) diff --git a/Examples/Quill/index.html b/Examples/Quill/index.html index 2ab08443..0199956a 100644 --- a/Examples/Quill/index.html +++ b/Examples/Quill/index.html @@ -139,7 +139,7 @@ - +