add overview demos

This commit is contained in:
Philipp Kühn 2021-08-25 18:18:15 +02:00
parent 7dd4e38af5
commit b95c81baff
3 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<div id="app"></div>
<script type="module">
import setup from '../../../../setup/vue.ts'
import source from '@source'
setup('Overview/Installation', source)
</script>
</body>
</html>

View File

@ -0,0 +1,5 @@
context('/installation', () => {
before(() => {
cy.visit('/installation')
})
})

View File

@ -0,0 +1,33 @@
<template>
<editor-content :editor="editor" />
</template>
<script>
import { Editor, EditorContent } from '@tiptap/vue-3'
import StarterKit from '@tiptap/starter-kit'
export default {
components: {
EditorContent,
},
data() {
return {
editor: null,
}
},
mounted() {
this.editor = new Editor({
content: '<p>Hello World! 🌎️</p>',
extensions: [
StarterKit,
],
})
},
beforeDestroy() {
this.editor.destroy()
},
}
</script>