From a01b7356d776398e5884d90c18628d2cfc5bd19b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Mon, 8 Mar 2021 22:07:51 +0100 Subject: [PATCH] refactoring --- .../Examples/Default/React/index-nope.jsx | 51 ------ .../Examples/Default/React/index-ori.jsx | 167 ------------------ 2 files changed, 218 deletions(-) delete mode 100644 docs/src/demos/Examples/Default/React/index-nope.jsx delete mode 100644 docs/src/demos/Examples/Default/React/index-ori.jsx diff --git a/docs/src/demos/Examples/Default/React/index-nope.jsx b/docs/src/demos/Examples/Default/React/index-nope.jsx deleted file mode 100644 index 171c75a0..00000000 --- a/docs/src/demos/Examples/Default/React/index-nope.jsx +++ /dev/null @@ -1,51 +0,0 @@ -// export default () => { -// const editor = useEditor({ -// content: '

hello react

', -// onTransaction() { -// // console.log('update', this) -// }, -// extensions: [ -// ...defaultExtensions(), -// // Paragraph.extend({ -// // addNodeView() { -// // return reactNodeView(() => { -// // // useEffect(() => { -// // // console.log('effect') -// // // }, []); - -// // return ( -// //

-// // -// //

-// // ) -// // }) -// // return ReactNodeViewRenderer(() => { -// // // useEffect(() => { -// // // console.log('effect') -// // // }, []); - -// // return ( -// //

-// // -// //

-// // ) -// // }) -// // }, -// // }), -// ] -// }) - -// return ( -// <> -// { editor && -// -// } -// -// -// ) -// } diff --git a/docs/src/demos/Examples/Default/React/index-ori.jsx b/docs/src/demos/Examples/Default/React/index-ori.jsx deleted file mode 100644 index e3893834..00000000 --- a/docs/src/demos/Examples/Default/React/index-ori.jsx +++ /dev/null @@ -1,167 +0,0 @@ -import React, { useState } from 'react' -import { defaultExtensions } from '@tiptap/starter-kit' -import { useEditor, Editor } from '@tiptap/react' -import './styles.scss' - -// useEditor only works for child components of -const MenuBar = () => { - const editor = useEditor() - - return ( - <> - - - - - - - - - - - - - - - - - - - - - - - ) -} - -export default () => { - const [value, setValue] = useState(` -

- Hi there, -

-

- this is a basic basic example of tiptap. Sure, there are all kind of basic text styles you’d probably expect from a text editor. But wait until you see the lists: -

-
    -
  • - That’s a bullet list with one … -
  • -
  • - … or two list items. -
  • -
-

- Isn’t that great? And all of that is editable. But wait, there’s more. Let’s try a code block: -

-
body {
-  display: none;
-}
-

- I know, I know, this is impressive. It’s only the tip of the iceberg though. Give it a try and click a little bit around. Don’t forget to check the other examples too. -

-
- Wow, that’s amazing. Good work, boy! 👏 -
- — Mom -
-`) - - return ( - <> - - - - - ) -}