From 2e62e9485258b8e955adca3026eab1549668a9ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Fri, 6 Nov 2020 17:34:58 +0100 Subject: [PATCH] refactoring --- docs/src/demos/React/index.jsx | 4 ++-- docs/src/docPages/guide/configuration.md | 2 +- docs/src/docPages/overview/installation.md | 2 +- packages/starter-kit/index.ts | 2 +- packages/vue-starter-kit/index.ts | 7 +------ 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/docs/src/demos/React/index.jsx b/docs/src/demos/React/index.jsx index 3bac032f6..44a8d68b7 100644 --- a/docs/src/demos/React/index.jsx +++ b/docs/src/demos/React/index.jsx @@ -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 () => { diff --git a/docs/src/docPages/guide/configuration.md b/docs/src/docPages/guide/configuration.md index ee58cfc99..9fc7cb85d 100644 --- a/docs/src/docPages/guide/configuration.md +++ b/docs/src/docPages/guide/configuration.md @@ -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'), diff --git a/docs/src/docPages/overview/installation.md b/docs/src/docPages/overview/installation.md index 2324a3f8f..940328e6e 100644 --- a/docs/src/docPages/overview/installation.md +++ b/docs/src/docPages/overview/installation.md @@ -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'), diff --git a/packages/starter-kit/index.ts b/packages/starter-kit/index.ts index db62e673f..00fd81aa0 100644 --- a/packages/starter-kit/index.ts +++ b/packages/starter-kit/index.ts @@ -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(), diff --git a/packages/vue-starter-kit/index.ts b/packages/vue-starter-kit/index.ts index 66c801436..6f15af049 100644 --- a/packages/vue-starter-kit/index.ts +++ b/packages/vue-starter-kit/index.ts @@ -1,7 +1,2 @@ -import originalDefaultExtensions from '@tiptap/starter-kit' - +export * from '@tiptap/starter-kit' export * from '@tiptap/vue' - -export function defaultExtensions() { - return originalDefaultExtensions() -}