docs: update content
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
|
||||
<script>
|
||||
import { Editor, EditorContent } from '@tiptap/vue-2'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -47,7 +47,9 @@ export default {
|
||||
Wow, this editor instance exports its content as HTML.
|
||||
</p>
|
||||
`,
|
||||
extensions: defaultExtensions(),
|
||||
extensions: [
|
||||
StarterKit,
|
||||
],
|
||||
})
|
||||
|
||||
// Get the initial content …
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<script>
|
||||
import { Editor, EditorContent } from '@tiptap/vue-2'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -47,7 +47,9 @@ export default {
|
||||
Wow, this editor instance exports its content as JSON.
|
||||
</p>
|
||||
`,
|
||||
extensions: defaultExtensions(),
|
||||
extensions: [
|
||||
StarterKit,
|
||||
],
|
||||
})
|
||||
|
||||
// Get the initial content …
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<script>
|
||||
import { Editor, EditorContent } from '@tiptap/vue-2'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -35,7 +35,9 @@ export default {
|
||||
If you want to check the state, you can call <code>editor.isEditable()</code>.
|
||||
</p>
|
||||
`,
|
||||
extensions: defaultExtensions(),
|
||||
extensions: [
|
||||
StarterKit,
|
||||
],
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<script>
|
||||
import { Editor, EditorContent } from '@tiptap/vue-2'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -42,7 +42,9 @@ export default {
|
||||
|
||||
mounted() {
|
||||
this.editor = new Editor({
|
||||
extensions: defaultExtensions(),
|
||||
extensions: [
|
||||
StarterKit,
|
||||
],
|
||||
content: this.value,
|
||||
onUpdate: () => {
|
||||
// HTML
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<script>
|
||||
import { Editor, EditorContent } from '@tiptap/vue-2'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
import DraggableItem from './DraggableItem.js'
|
||||
|
||||
export default {
|
||||
@@ -23,7 +23,7 @@ export default {
|
||||
mounted() {
|
||||
this.editor = new Editor({
|
||||
extensions: [
|
||||
...defaultExtensions(),
|
||||
StarterKit,
|
||||
DraggableItem,
|
||||
],
|
||||
content: `
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<script>
|
||||
import { Editor, EditorContent } from '@tiptap/vue-2'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
import NodeView from './Extension.js'
|
||||
|
||||
export default {
|
||||
@@ -21,7 +21,7 @@ export default {
|
||||
mounted() {
|
||||
this.editor = new Editor({
|
||||
extensions: [
|
||||
...defaultExtensions(),
|
||||
StarterKit,
|
||||
NodeView,
|
||||
],
|
||||
content: `
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<script>
|
||||
import { Editor, EditorContent } from '@tiptap/vue-2'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
import NodeView from './Extension.js'
|
||||
|
||||
export default {
|
||||
@@ -21,7 +21,7 @@ export default {
|
||||
mounted() {
|
||||
this.editor = new Editor({
|
||||
extensions: [
|
||||
...defaultExtensions(),
|
||||
StarterKit,
|
||||
NodeView,
|
||||
],
|
||||
content: `
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import React from 'react'
|
||||
import { useEditor, EditorContent } from '@tiptap/react'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
import ReactComponent from './Extension.js'
|
||||
import './styles.scss'
|
||||
|
||||
export default () => {
|
||||
const editor = useEditor({
|
||||
extensions: [
|
||||
...defaultExtensions(),
|
||||
StarterKit,
|
||||
ReactComponent,
|
||||
],
|
||||
content: `
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import React from 'react'
|
||||
import { useEditor, EditorContent } from '@tiptap/react'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
import ReactComponent from './Extension.js'
|
||||
import './styles.scss'
|
||||
|
||||
export default () => {
|
||||
const editor = useEditor({
|
||||
extensions: [
|
||||
...defaultExtensions(),
|
||||
StarterKit,
|
||||
ReactComponent,
|
||||
],
|
||||
content: `
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<script>
|
||||
import { Editor, EditorContent } from '@tiptap/vue-2'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
import TableOfContents from './TableOfContents.js'
|
||||
|
||||
export default {
|
||||
@@ -23,7 +23,7 @@ export default {
|
||||
mounted() {
|
||||
this.editor = new Editor({
|
||||
extensions: [
|
||||
...defaultExtensions(),
|
||||
StarterKit,
|
||||
TableOfContents,
|
||||
],
|
||||
content: `
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<script>
|
||||
import { Editor, EditorContent } from '@tiptap/vue-2'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
import VueComponent from './Extension.js'
|
||||
|
||||
export default {
|
||||
@@ -21,7 +21,7 @@ export default {
|
||||
mounted() {
|
||||
this.editor = new Editor({
|
||||
extensions: [
|
||||
...defaultExtensions(),
|
||||
StarterKit,
|
||||
VueComponent,
|
||||
],
|
||||
content: `
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<script>
|
||||
import { Editor, EditorContent } from '@tiptap/vue-2'
|
||||
import { defaultExtensions } from '@tiptap/starter-kit'
|
||||
import StarterKit from '@tiptap/starter-kit'
|
||||
import VueComponent from './Extension.js'
|
||||
|
||||
export default {
|
||||
@@ -21,7 +21,7 @@ export default {
|
||||
mounted() {
|
||||
this.editor = new Editor({
|
||||
extensions: [
|
||||
...defaultExtensions(),
|
||||
StarterKit,
|
||||
VueComponent,
|
||||
],
|
||||
content: `
|
||||
|
||||
Reference in New Issue
Block a user