remove global window.editor instance from demos
This commit is contained in:
@@ -82,8 +82,6 @@ export default {
|
||||
<p>This editor is based on Prosemirror, fully extendable and renderless. You can easily add custom nodes as Vue components.</p>
|
||||
`,
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -54,8 +54,6 @@ export default {
|
||||
this.json = this.editor.json()
|
||||
this.html = this.editor.html()
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
@@ -47,8 +47,6 @@ export default {
|
||||
</ul>
|
||||
`,
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -38,8 +38,6 @@ export default {
|
||||
`,
|
||||
extensions: defaultExtensions(),
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -33,8 +33,6 @@ export default {
|
||||
`,
|
||||
extensions: defaultExtensions(),
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -33,8 +33,6 @@ export default {
|
||||
`,
|
||||
extensions: defaultExtensions(),
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
||||
@@ -29,8 +29,6 @@ export default {
|
||||
Text(),
|
||||
],
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -42,8 +42,6 @@ export default {
|
||||
<p>Albert Einstein</p>
|
||||
`,
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -45,8 +45,6 @@ export default {
|
||||
<p style="font-weight: 999">Up to font weight 999!!!</p>
|
||||
`,
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -44,8 +44,6 @@ export default {
|
||||
</ul>
|
||||
`,
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -40,8 +40,6 @@ export default {
|
||||
<p><code>This is code.</code></p>
|
||||
`,
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -51,8 +51,6 @@ export default {
|
||||
<p>Press Command/Ctrl + Enter to leave the fenced code block and continue typing in boring paragraphs.
|
||||
`,
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -33,8 +33,6 @@ export default {
|
||||
<p>The Document extension is required. Though, you can write your own implementation, e. g. to give it custom name.</p>
|
||||
`,
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -48,8 +48,6 @@ export default {
|
||||
</p>
|
||||
`,
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -50,8 +50,6 @@ export default {
|
||||
<h4>This headline will be converted to a paragraph, because it's not defined in the levels option.</h4>
|
||||
`,
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -42,8 +42,6 @@ export default {
|
||||
<p>Edit this text and press undo to test this extension.</p>
|
||||
`,
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -43,8 +43,6 @@ export default {
|
||||
<p>But between those paragraphs are horizontal rules.</p>
|
||||
`,
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -42,8 +42,6 @@ export default {
|
||||
<p style="font-style: italic">This as well.</p>
|
||||
`,
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -33,8 +33,6 @@ export default {
|
||||
<p>The Paragraph extension is not required, but it’s very likely you want to use it. It’s needed to write paragraphs of text. 🤓</p>
|
||||
`,
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -43,8 +43,6 @@ export default {
|
||||
<p style="text-decoration: line-through">This as well.</p>
|
||||
`,
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -41,8 +41,6 @@ export default {
|
||||
<p style="text-decoration: underline">And this as well.</p>
|
||||
`,
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
Reference in New Issue
Block a user