Merge branch 'main' of https://github.com/ueberdosis/tiptap-next into feature/replace-classes
# Conflicts: # docs/src/demos/Examples/Focus/index.vue # docs/src/docPages/api/extensions/placeholder.md # docs/src/docPages/general/roadmap.md
This commit is contained in:
5
docs/src/demos/Extensions/Document/index.spec.js
Normal file
5
docs/src/demos/Extensions/Document/index.spec.js
Normal file
@@ -0,0 +1,5 @@
|
||||
context('/api/extensions/document', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/api/extensions/document')
|
||||
})
|
||||
})
|
||||
44
docs/src/demos/Extensions/Document/index.vue
Normal file
44
docs/src/demos/Extensions/Document/index.vue
Normal file
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<div v-if="editor">
|
||||
<editor-content :editor="editor" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Editor } from '@tiptap/core'
|
||||
import { EditorContent } from '@tiptap/vue'
|
||||
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: [
|
||||
new Document(),
|
||||
new Paragraph(),
|
||||
new Text(),
|
||||
],
|
||||
content: `
|
||||
<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() {
|
||||
this.editor.destroy()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -38,7 +38,7 @@ context('/api/extensions/history', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('the keyboard shortcut should apply the last undone change again', () => {
|
||||
it.skip('the keyboard shortcut should apply the last undone change again', () => {
|
||||
const undoShortcut = Cypress.platform === 'darwin' ? '{meta}z' : '{ctrl}z'
|
||||
const redoShortcut = Cypress.platform === 'darwin' ? '{meta}{shift}z' : '{ctrl}{shift}z'
|
||||
|
||||
|
||||
5
docs/src/demos/Extensions/Paragraph/index.spec.js
Normal file
5
docs/src/demos/Extensions/Paragraph/index.spec.js
Normal file
@@ -0,0 +1,5 @@
|
||||
context('/api/extensions/paragraph', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/api/extensions/paragraph')
|
||||
})
|
||||
})
|
||||
44
docs/src/demos/Extensions/Paragraph/index.vue
Normal file
44
docs/src/demos/Extensions/Paragraph/index.vue
Normal file
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<div v-if="editor">
|
||||
<editor-content :editor="editor" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Editor } from '@tiptap/core'
|
||||
import { EditorContent } from '@tiptap/vue'
|
||||
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: [
|
||||
new Document(),
|
||||
new Paragraph(),
|
||||
new Text(),
|
||||
],
|
||||
content: `
|
||||
<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() {
|
||||
this.editor.destroy()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user