diff --git a/README.v13.md b/README.v13.md new file mode 100644 index 00000000..441e6611 --- /dev/null +++ b/README.v13.md @@ -0,0 +1,18 @@ +# ![Yjs](https://user-images.githubusercontent.com/5553757/48975307-61efb100-f06d-11e8-9177-ee895e5916e5.png) +> A CRDT library with a powerful abstraction of shared data + +Yjs v13 is a work in progress. + +### Typescript Declarations + +Until [this](https://github.com/Microsoft/TypeScript/issues/7546) is fixed, the only way to get type declarations is by adding Yjs to the list of checked files: + +```json +{ + "checkJs": true, + "include": [ + "./node_modules/yjs/" + ] + .. +} +``` diff --git a/examples/dom.html b/examples/dom.html new file mode 100644 index 00000000..f63eb8cf --- /dev/null +++ b/examples/dom.html @@ -0,0 +1,31 @@ + + + + Yjs Prosemirror Example + + + + +
+
+
+ + + \ No newline at end of file diff --git a/examples/dom.mjs b/examples/dom.mjs new file mode 100644 index 00000000..0c4d9197 --- /dev/null +++ b/examples/dom.mjs @@ -0,0 +1,12 @@ +import * as Y from '../index.mjs' +import { WebsocketProvider } from '../provider/websocket.mjs' +import { DomBinding } from '../bindings/dom.mjs' + +const provider = new WebsocketProvider('wss://api.yjs.website') +const ydocument = provider.get('dom') +const type = ydocument.define('xml', Y.XmlFragment) +const binding = new DomBinding(type, document.querySelector('#content'), { scrollingElement: document.scrollingElement }) + +window.example = { + provider, ydocument, type, binding +} diff --git a/examples/prosemirror.html b/examples/prosemirror.html index 512d62c4..9f66f109 100644 --- a/examples/prosemirror.html +++ b/examples/prosemirror.html @@ -43,10 +43,7 @@
- +