diff --git a/docs/src/demos/Experiments/Annotation/index.spec.js b/docs/src/demos/Experiments/Annotation/index.spec.js
index 593a5e738..f1b0a3aed 100644
--- a/docs/src/demos/Experiments/Annotation/index.spec.js
+++ b/docs/src/demos/Experiments/Annotation/index.spec.js
@@ -1,6 +1,6 @@
-context('/demos/Extensions/Annotations', () => {
+context('/demos/Experiments/Annotation', () => {
before(() => {
- cy.visit('/demos/Extensions/Annotations')
+ cy.visit('/demos/Experiments/Annotation')
})
// TODO: Write tests
diff --git a/docs/src/demos/Experiments/Annotation/index.vue b/docs/src/demos/Experiments/Annotation/index.vue
index 9ab118117..7ba445ae3 100644
--- a/docs/src/demos/Experiments/Annotation/index.vue
+++ b/docs/src/demos/Experiments/Annotation/index.vue
@@ -1,17 +1,33 @@
@@ -54,21 +84,49 @@ export default {
`, }) + + this.anotherEditor = new Editor({ + extensions: [ + Document, + Paragraph, + Text, + Bold, + Heading, + Annotation.configure({ + document: this.ydoc, + }), + Collaboration.configure({ + document: this.ydoc, + }), + ], + }) }, methods: { - addAnnotation() { - const content = prompt('Annotation', '') + addComment() { + const content = prompt('Comment', '') this.editor.commands.addAnnotation(content) }, - deleteAnnotation(id) { + addAnotherComment() { + const content = prompt('Comment', '') + + this.anotherEditor.commands.addAnnotation(content) + }, + deleteComment(id) { this.editor.commands.deleteAnnotation(id) }, }, + computed: { + json() { + return this.ydoc.toJSON() + }, + }, + beforeDestroy() { this.editor.destroy() + this.anotherEditor.destroy() }, } diff --git a/docs/src/demos/Experiments/Comments/index.spec.js b/docs/src/demos/Experiments/Comments/index.spec.js deleted file mode 100644 index 109134a01..000000000 --- a/docs/src/demos/Experiments/Comments/index.spec.js +++ /dev/null @@ -1,7 +0,0 @@ -context('/demos/Examples/Annotations', () => { - before(() => { - cy.visit('/demos/Examples/Annotations') - }) - - // TODO: Write tests -}) diff --git a/docs/src/demos/Experiments/Comments/index.vue b/docs/src/demos/Experiments/Comments/index.vue deleted file mode 100644 index 9945c558a..000000000 --- a/docs/src/demos/Experiments/Comments/index.vue +++ /dev/null @@ -1,146 +0,0 @@ - -