diff --git a/.esdoc.json b/.esdoc.json
new file mode 100644
index 00000000..90752511
--- /dev/null
+++ b/.esdoc.json
@@ -0,0 +1,10 @@
+{
+ "source": "./src",
+ "destination": "./docs",
+ "plugins": [{
+ "name": "esdoc-standard-plugin",
+ "option": {
+ "accessor": {"access": ["public"], "autoPrivate": true}
+ }
+ }]
+}
diff --git a/.gitignore b/.gitignore
index 1173b99b..d784cd40 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
node_modules
bower_components
+docs
/y.*
/examples/yjs-dist.js*
diff --git a/README.md b/README.md
index 48e7c555..94c0b770 100644
--- a/README.md
+++ b/README.md
@@ -6,13 +6,6 @@ text, richtext, json, or XML. It is fairly easy to get started, as Yjs hides
most of the complexity of concurrent editing. For additional information, demos,
and tutorials visit [y-js.org](http://y-js.org/).
->**If you ever felt like giving back - now is the time! Me and a group of friends have organized a fundraiser to bring heathy food to unprivileged children in Vegas. Good food is often hard to come by. Thus some children don’t eat vegetables on a regular basis. We are offering free daily meals with fresh produce and we are going to build a self-sustainable garden at an elementary school to educate children how to live healthy. https://urbanseedfoundation.networkforgood.com/projects/48182-kevin-jahns-s-fundraiser**
->
-> Your support on my funding page would mean the world to me :raised_hands:
->
-> Also check the description in the link above: If we get to 2500$, I'm going to publish a premium Yjs documentation for the upcoming v13 release! There are also some other goals. The fundraising campaign ends very soon!
-
-
### Extensions
Yjs only knows how to resolve conflicts on shared data. You have to choose a ..
* *Connector* - a communication protocol that propagates changes to the clients
diff --git a/examples/html-editor-drawing-hook/index.js b/examples/html-editor-drawing-hook/index.js
index 27b58a10..7da324bc 100644
--- a/examples/html-editor-drawing-hook/index.js
+++ b/examples/html-editor-drawing-hook/index.js
@@ -1,12 +1,25 @@
/* global Y, d3 */
+const hooks = {
+ 'magic-drawing': {
+ fillType: function (dom, type) {
+ initDrawingBindings(type, dom)
+ },
+ createDom: function (type) {
+ const dom = document.createElement('magic-drawing')
+ initDrawingBindings(type, dom)
+ return dom
+ }
+ }
+}
+
window.onload = function () {
- window.yXmlType.bindToDom(document.body)
+ window.domBinding = new Y.DomBinding(window.yXmlType, document.body, { hooks })
}
window.addMagicDrawing = function addMagicDrawing () {
let mt = document.createElement('magic-drawing')
- mt.dataset.yjsHook = 'magic-drawing'
+ mt.setAttribute('data-yjs-hook', 'magic-drawing')
document.body.append(mt)
}
@@ -17,7 +30,7 @@ var renderPath = d3.svg.line()
function initDrawingBindings (type, dom) {
dom.contentEditable = 'false'
- dom.dataset.yjsHook = 'magic-drawing'
+ dom.setAttribute('data-yjs-hook', 'magic-drawing')
var drawing = type.get('drawing')
if (drawing === undefined) {
drawing = type.set('drawing', new Y.Array())
@@ -96,17 +109,6 @@ function initDrawingBindings (type, dom) {
}
}
-Y.XmlHook.addHook('magic-drawing', {
- fillType: function (dom, type) {
- initDrawingBindings(type, dom)
- },
- createDom: function (type) {
- const dom = document.createElement('magic-drawing')
- initDrawingBindings(type, dom)
- return dom
- }
-})
-
let y = new Y('html-editor-drawing-hook-example', {
connector: {
name: 'websockets-client',
diff --git a/examples/html-editor/index.js b/examples/html-editor/index.js
index 946fdb3a..80623031 100644
--- a/examples/html-editor/index.js
+++ b/examples/html-editor/index.js
@@ -1,7 +1,7 @@
/* global Y */
window.onload = function () {
- window.yXmlType.bindToDom(document.body)
+ window.domBinding = new Y.DomBinding(window.yXmlType, document.body)
}
let y = new Y('htmleditor', {
diff --git a/examples/quill-cursors/index.html b/examples/quill-cursors/index.html
new file mode 100644
index 00000000..1e63961c
--- /dev/null
+++ b/examples/quill-cursors/index.html
@@ -0,0 +1,21 @@
+
+
+