test(examples): try to fix broken test for images react demo
This commit is contained in:
committed by
Dominik
parent
483468df66
commit
19cc6e1f28
@@ -1,11 +1,13 @@
|
|||||||
|
import './styles.scss'
|
||||||
|
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { useEditor, EditorContent } from '@tiptap/react'
|
|
||||||
import Document from '@tiptap/extension-document'
|
import Document from '@tiptap/extension-document'
|
||||||
|
import Dropcursor from '@tiptap/extension-dropcursor'
|
||||||
|
import Image from '@tiptap/extension-image'
|
||||||
import Paragraph from '@tiptap/extension-paragraph'
|
import Paragraph from '@tiptap/extension-paragraph'
|
||||||
import Text from '@tiptap/extension-text'
|
import Text from '@tiptap/extension-text'
|
||||||
import Image from '@tiptap/extension-image'
|
import { EditorContent, useEditor } from '@tiptap/react'
|
||||||
import Dropcursor from '@tiptap/extension-dropcursor'
|
|
||||||
import './styles.scss'
|
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const editor = useEditor({
|
const editor = useEditor({
|
||||||
@@ -33,9 +35,7 @@ export default () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<button onClick={addImage}>
|
<button onClick={addImage}>add image from URL</button>
|
||||||
add image from URL
|
|
||||||
</button>
|
|
||||||
<EditorContent editor={editor} />
|
<EditorContent editor={editor} />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="editor">
|
<div v-if="editor">
|
||||||
<button @click="addImage">
|
<button @click="addImage">add image from URL</button>
|
||||||
add image from URL
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
<editor-content :editor="editor" />
|
<editor-content :editor="editor" />
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user