From 5a1089e84f2297ead42f970194ae58fa94415428 Mon Sep 17 00:00:00 2001 From: Akhmed Ibragimov Date: Mon, 1 Jul 2024 19:38:28 +0300 Subject: [PATCH] Landing page (#200) * landing page --- package.json | 2 +- packages/development/src/pages/dev/index.tsx | 21 +- .../public/android-chrome-192x192.png | Bin 0 -> 21392 bytes .../public/android-chrome-384x384.png | Bin 0 -> 55869 bytes .../public/android-chrome-512x512.png | Bin 0 -> 17766 bytes web/next-example/public/apple-touch-icon.png | Bin 0 -> 14151 bytes web/next-example/public/browserconfig.xml | 9 + web/next-example/public/favicon-16x16.png | Bin 0 -> 1025 bytes web/next-example/public/favicon-32x32.png | Bin 0 -> 1955 bytes web/next-example/public/favicon.ico | Bin 25931 -> 15086 bytes .../public/hold-up-let-him-cook.gif | Bin 0 -> 157800 bytes web/next-example/public/manifest.json | 1 + web/next-example/public/mstile-150x150.png | Bin 0 -> 11973 bytes web/next-example/public/robots.txt | 2 + web/next-example/public/safari-pinned-tab.svg | 50 + web/next-example/public/site.webmanifest | 19 + 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 | 300 +++- web/next-example/src/styles/globals.scss | 6 + web/next-example/tailwind.config.ts | 95 +- 22 files changed, 1887 insertions(+), 70 deletions(-) create mode 100644 web/next-example/public/android-chrome-192x192.png create mode 100644 web/next-example/public/android-chrome-384x384.png create mode 100644 web/next-example/public/android-chrome-512x512.png create mode 100644 web/next-example/public/apple-touch-icon.png create mode 100644 web/next-example/public/browserconfig.xml create mode 100644 web/next-example/public/favicon-16x16.png create mode 100644 web/next-example/public/favicon-32x32.png create mode 100644 web/next-example/public/hold-up-let-him-cook.gif create mode 100644 web/next-example/public/manifest.json create mode 100644 web/next-example/public/mstile-150x150.png create mode 100644 web/next-example/public/robots.txt create mode 100644 web/next-example/public/safari-pinned-tab.svg create mode 100644 web/next-example/public/site.webmanifest 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 (
-