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>
|
<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() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -54,8 +54,6 @@ export default {
|
|||||||
this.json = this.editor.json()
|
this.json = this.editor.json()
|
||||||
this.html = this.editor.html()
|
this.html = this.editor.html()
|
||||||
})
|
})
|
||||||
|
|
||||||
window.editor = this.editor
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -47,8 +47,6 @@ export default {
|
|||||||
</ul>
|
</ul>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
|
||||||
window.editor = this.editor
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -38,8 +38,6 @@ export default {
|
|||||||
`,
|
`,
|
||||||
extensions: defaultExtensions(),
|
extensions: defaultExtensions(),
|
||||||
})
|
})
|
||||||
|
|
||||||
window.editor = this.editor
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ export default {
|
|||||||
`,
|
`,
|
||||||
extensions: defaultExtensions(),
|
extensions: defaultExtensions(),
|
||||||
})
|
})
|
||||||
|
|
||||||
window.editor = this.editor
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ export default {
|
|||||||
`,
|
`,
|
||||||
extensions: defaultExtensions(),
|
extensions: defaultExtensions(),
|
||||||
})
|
})
|
||||||
|
|
||||||
window.editor = this.editor
|
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@@ -29,8 +29,6 @@ export default {
|
|||||||
Text(),
|
Text(),
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
window.editor = this.editor
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -42,8 +42,6 @@ export default {
|
|||||||
<p>Albert Einstein</p>
|
<p>Albert Einstein</p>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
|
||||||
window.editor = this.editor
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -45,8 +45,6 @@ export default {
|
|||||||
<p style="font-weight: 999">Up to font weight 999!!!</p>
|
<p style="font-weight: 999">Up to font weight 999!!!</p>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
|
||||||
window.editor = this.editor
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -44,8 +44,6 @@ export default {
|
|||||||
</ul>
|
</ul>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
|
||||||
window.editor = this.editor
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -40,8 +40,6 @@ export default {
|
|||||||
<p><code>This is code.</code></p>
|
<p><code>This is code.</code></p>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
|
||||||
window.editor = this.editor
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -51,8 +51,6 @@ export default {
|
|||||||
<p>Press Command/Ctrl + Enter to leave the fenced code block and continue typing in boring paragraphs.
|
<p>Press Command/Ctrl + Enter to leave the fenced code block and continue typing in boring paragraphs.
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
|
||||||
window.editor = this.editor
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
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>
|
<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() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -48,8 +48,6 @@ export default {
|
|||||||
</p>
|
</p>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
|
||||||
window.editor = this.editor
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
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>
|
<h4>This headline will be converted to a paragraph, because it's not defined in the levels option.</h4>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
|
||||||
window.editor = this.editor
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -42,8 +42,6 @@ export default {
|
|||||||
<p>Edit this text and press undo to test this extension.</p>
|
<p>Edit this text and press undo to test this extension.</p>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
|
||||||
window.editor = this.editor
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -43,8 +43,6 @@ export default {
|
|||||||
<p>But between those paragraphs are horizontal rules.</p>
|
<p>But between those paragraphs are horizontal rules.</p>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
|
||||||
window.editor = this.editor
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -42,8 +42,6 @@ export default {
|
|||||||
<p style="font-style: italic">This as well.</p>
|
<p style="font-style: italic">This as well.</p>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
|
||||||
window.editor = this.editor
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
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>
|
<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() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -43,8 +43,6 @@ export default {
|
|||||||
<p style="text-decoration: line-through">This as well.</p>
|
<p style="text-decoration: line-through">This as well.</p>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
|
||||||
window.editor = this.editor
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|||||||
@@ -41,8 +41,6 @@ export default {
|
|||||||
<p style="text-decoration: underline">And this as well.</p>
|
<p style="text-decoration: underline">And this as well.</p>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
|
||||||
window.editor = this.editor
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|||||||
Reference in New Issue
Block a user