rename example

This commit is contained in:
Hans Pagel
2021-01-26 00:39:26 +01:00
parent 211df5a23b
commit 3bbd28f401
6 changed files with 12 additions and 12 deletions

View File

@@ -0,0 +1,7 @@
context('/demos/Examples/Minimal', () => {
before(() => {
cy.visit('/demos/Examples/Minimal')
})
// TODO: Write tests
})

View File

@@ -0,0 +1,53 @@
<template>
<editor-content :editor="editor" />
</template>
<script>
import { Editor, EditorContent } from '@tiptap/vue-starter-kit'
import Document from '@tiptap/extension-document'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'
export default {
components: {
EditorContent,
},
data() {
return {
editor: null,
}
},
mounted() {
this.editor = new Editor({
extensions: [
Document,
Paragraph,
Text,
],
content: `
<p>
This is a radically reduced version of tiptap. It has only support for a document, paragraphs and text. Thats it. Its probably too much for real minimalists though.
</p>
<p>
The paragraph extension is not really required, but you need at least one node. Sure, that node can be something different. Youll mostly likely want to add a paragraph though.
</p>
`,
})
},
beforeDestroy() {
this.editor.destroy()
},
}
</script>
<style lang="scss">
/* Basic editor styles */
.ProseMirror {
> * + * {
margin-top: 0.75em;
}
}
</style>