From 47e10e7ddcab9a7e6f7802b42e5a77707c9bd3a7 Mon Sep 17 00:00:00 2001 From: Yayan Date: Fri, 30 Sep 2022 20:28:26 +0700 Subject: [PATCH 1/2] Feature: Add Slate JS Editor --- package.json | 12 +- src/Layout/Layout.tsx | 4 + src/Layout/Main/VacancyForm.tsx | 374 ++++++++++++ src/Layout/Navigation/ListButton.tsx | 5 + src/components/Wysiwig/Richtect.tsx | 245 ++++++++ src/components/Wysiwig/SlateComponent.tsx | 195 ++++++ src/pages/qr-code-for-vacancy.tsx | 13 + src/styles/globals.css | 16 + yarn.lock | 710 +++++++++++++++++++++- 9 files changed, 1560 insertions(+), 14 deletions(-) create mode 100644 src/Layout/Main/VacancyForm.tsx create mode 100644 src/components/Wysiwig/Richtect.tsx create mode 100644 src/components/Wysiwig/SlateComponent.tsx create mode 100644 src/pages/qr-code-for-vacancy.tsx diff --git a/package.json b/package.json index 6253108..4db1b4e 100644 --- a/package.json +++ b/package.json @@ -9,16 +9,26 @@ "lint": "next lint" }, "dependencies": { - "@heroicons/react": "^2.0.1", + "@emotion/css": "^11.10.0", + "@emotion/react": "^11.10.4", + "@emotion/styled": "^11.10.4", "@hookform/resolvers": "^2.9.7", + "@mui/icons-material": "^5.10.6", + "@mui/material": "^5.10.6", + "draft-js": "^0.11.7", "next": "12.2.5", "qrcode.react": "^3.1.0", "react": "18.2.0", "react-dom": "18.2.0", + "react-draft-wysiwyg": "^1.15.0", "react-file-base64": "^1.0.3", "react-hook-form": "^7.34.2", "react-icons": "^4.4.0", + "react-icons-kit": "^2.0.0", "save-svg-as-png": "^1.4.17", + "slate": "^0.82.1", + "slate-history": "^0.66.0", + "slate-react": "^0.82.2", "yup": "^0.32.11" }, "devDependencies": { diff --git a/src/Layout/Layout.tsx b/src/Layout/Layout.tsx index 4211a83..7db42d2 100644 --- a/src/Layout/Layout.tsx +++ b/src/Layout/Layout.tsx @@ -19,6 +19,10 @@ const Layout = (props: any) => { {props.children} +