mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-12 04:33:34 +08:00
add overview demos
This commit is contained in:
parent
7dd4e38af5
commit
b95c81baff
15
demos/src/Overview/Installation/Vue/index.html
Normal file
15
demos/src/Overview/Installation/Vue/index.html
Normal 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>
|
5
demos/src/Overview/Installation/Vue/index.spec.js
Normal file
5
demos/src/Overview/Installation/Vue/index.spec.js
Normal file
@ -0,0 +1,5 @@
|
||||
context('/installation', () => {
|
||||
before(() => {
|
||||
cy.visit('/installation')
|
||||
})
|
||||
})
|
33
demos/src/Overview/Installation/Vue/index.vue
Normal file
33
demos/src/Overview/Installation/Vue/index.vue
Normal 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>
|
Loading…
Reference in New Issue
Block a user