diff --git a/examples/ace/index.html b/examples/ace/index.html index c1c5242e..3b9404b6 100644 --- a/examples/ace/index.html +++ b/examples/ace/index.html @@ -24,7 +24,8 @@
- + + diff --git a/examples/ace/index.js b/examples/ace/index.js index 8228968a..85487bc2 100644 --- a/examples/ace/index.js +++ b/examples/ace/index.js @@ -1,24 +1,17 @@ /* global Y, ace */ -Y({ - db: { - name: 'memory' - }, +let y = new Y('ace-example', { connector: { name: 'websockets-client', - room: 'ace-example' - }, - sourceDir: '/bower_components', - share: { - ace: 'Text' // y.share.textarea is of type Y.Text + url: 'http://127.0.0.1:1234' } -}).then(function (y) { - window.yAce = y - - // bind the textarea to a shared text element - var editor = ace.edit('aceContainer') - editor.setTheme('ace/theme/chrome') - editor.getSession().setMode('ace/mode/javascript') - - y.share.ace.bindAce(editor) }) + +window.yAce = y + +// bind the textarea to a shared text element +var editor = ace.edit('aceContainer') +editor.setTheme('ace/theme/chrome') +editor.getSession().setMode('ace/mode/javascript') + +y.define('ace', Y.Text).bindAce(editor) diff --git a/examples/chat/index.html b/examples/chat/index.html index 20f5417f..228c7e75 100644 --- a/examples/chat/index.html +++ b/examples/chat/index.html @@ -13,7 +13,7 @@ - +