From fa7d1b30f37e4aba39ece0854f909f031501a8ce Mon Sep 17 00:00:00 2001 From: Darginec05 Date: Sun, 30 Jun 2024 17:16:34 +0200 Subject: [PATCH 1/6] landing page is progress --- package.json | 2 +- packages/development/src/pages/dev/index.tsx | 21 +- .../public/hold-up-let-him-cook.gif | Bin 0 -> 157800 bytes web/next-example/public/yoopta-logo.png | Bin 0 -> 857977 bytes .../LandingEditor/LandingEditor.tsx | 121 ++ .../src/components/LandingEditor/value.ts | 1331 +++++++++++++++++ web/next-example/src/pages/index.tsx | 175 ++- web/next-example/src/styles/globals.scss | 6 + web/next-example/tailwind.config.ts | 95 +- 9 files changed, 1683 insertions(+), 68 deletions(-) create mode 100644 web/next-example/public/hold-up-let-him-cook.gif create mode 100644 web/next-example/public/yoopta-logo.png create mode 100644 web/next-example/src/components/LandingEditor/LandingEditor.tsx create mode 100644 web/next-example/src/components/LandingEditor/value.ts diff --git a/package.json b/package.json index e7b29ed8b..7f8338967 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ ], "private": true, "scripts": { - "start": "yarn lerna run start --parallel --ignore development", + "start": "yarn lerna run start --scope @yoopta/editor --parallel --ignore development", "build": "yarn clean && yarn lerna run build --parallel --ignore development", "clean": "find ./packages -type d -name dist ! -path './packages/development/*' -exec rm -rf {} +", "serve": "yarn lerna run dev --scope=development", diff --git a/packages/development/src/pages/dev/index.tsx b/packages/development/src/pages/dev/index.tsx index 80a495fd9..09ce633d9 100644 --- a/packages/development/src/pages/dev/index.tsx +++ b/packages/development/src/pages/dev/index.tsx @@ -39,22 +39,8 @@ const BasicExample = () => { console.log('EDITOR DATA', editorData); }; - useEffect(() => { - setTimeout(() => { - Elements.insertElementText(editor, 'Super text', { - blockId: '7453ac69-0d2a-4a27-ac48-21de5021c432', - }); - }, 1000); - }, [editor]); - return ( <> - {/*
- -
*/} - {/*
- -
*/}
{ placeholder="Type / to open menu" tools={TOOLS} readOnly={readOnly} + blockActionButtons={{ + // drag: null, + plus: null, + }} value={{ '7453ac69-0d2a-4a27-ac48-21de5021c432': { id: '7453ac69-0d2a-4a27-ac48-21de5021c432', @@ -328,12 +318,9 @@ const BasicExample = () => { const Buttons = ({ onSubmit }: any) => { const editor = useYooptaEditor(); - const isFocused = useYooptaFocused(); - const [mdValue, setMdValue] = useState(''); return (
-