refactoring

This commit is contained in:
Philipp Kühn 2020-11-06 17:34:58 +01:00
parent 3c49928347
commit 2e62e94852
5 changed files with 6 additions and 11 deletions

View File

@ -1,5 +1,5 @@
import React, { useState } from 'react'
import extensions from '@tiptap/starter-kit'
import { defaultExtensions } from '@tiptap/starter-kit'
import { useEditor, Editor } from './components/Editor'
// Menu bar example component
@ -60,7 +60,7 @@ export default () => {
<Editor
value={value}
onChange={setValue}
extensions={extensions()}
extensions={defaultExtensions()}
>
<MenuBar />
</Editor>

View File

@ -10,7 +10,7 @@ See an example with `autoFocus: true` here:
```js
import { Editor } from '@tiptap/core'
import defaultExtensions from '@tiptap/starter-kit'
import { defaultExtensions } from '@tiptap/starter-kit'
new Editor({
element: document.getElementsByClassName('element'),

View File

@ -20,7 +20,7 @@ Great, that should be enough to start. Here is the most essential code you need
```js
import { Editor } from '@tiptap/core'
import defaultExtensions from '@tiptap/starter-kit'
import { defaultExtensions } from '@tiptap/starter-kit'
new Editor({
element: document.getElementsByClassName('element'),

View File

@ -17,7 +17,7 @@ import BulletList from '@tiptap/extension-bullet-list'
import OrderedList from '@tiptap/extension-ordered-list'
import ListItem from '@tiptap/extension-list-item'
export default function defaultExtensions() {
export function defaultExtensions() {
return [
Dropcursor(),
Gapcursor(),

View File

@ -1,7 +1,2 @@
import originalDefaultExtensions from '@tiptap/starter-kit'
export * from '@tiptap/starter-kit'
export * from '@tiptap/vue'
export function defaultExtensions() {
return originalDefaultExtensions()
}