Skip to content

Commit

Permalink
Merge pull request #23 from websitesieutoc/remove-tinymce
Browse files Browse the repository at this point in the history
remove tinymce from nextjs-template
  • Loading branch information
minhphuc010194 authored Oct 23, 2023
2 parents d592939 + 93d4bb7 commit e2b2ad5
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 114 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
} from '@/components/chakra';
import { useAuth, useEffect, useRouter, useState, useToast } from '@/hooks';
import { ChevronDownIcon, ChevronUpIcon } from '@/icons';
import { TextEditor } from '@/components/client';
import type { Post } from '@/types';
import slugify from 'slugify';

Expand Down Expand Up @@ -165,8 +164,6 @@ export default function BlogEditForm({ data }: BlogEditFormProps) {
size="sm"
marginY={1}
/>

<TextEditor onChange={(text) => setContent(text)} value={content} />
</Box>
<Box w="20%">
<Card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import slugify from 'slugify';
import { useRouter, useSearchParams } from 'next/navigation';
import { useSWR, useAuth, useToast } from '@/hooks';
import { ChevronDownIcon, ChevronUpIcon } from '@/icons';
import { PostList, TextEditor } from '@/components/client';
import { PostList } from '@/components/client';
import type { Post } from '@/types';

type RequireInputType = {
Expand Down Expand Up @@ -190,8 +190,6 @@ export default function BlogEditor() {
size="sm"
marginY={1}
/>

<TextEditor onChange={(text) => setContent(text)} value={content} />
</Box>
<Box w="20%">
<Card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Input,
Stack,
} from '@/components/chakra';
import { CustomEditable, FormWrapper, TextEditor } from '@/components/client';
import { CustomEditable, FormWrapper } from '@/components/client';
import {
useAuth,
useEffect,
Expand Down Expand Up @@ -182,14 +182,6 @@ export const PageForm = ({

<FormControl id="text-editor" isDisabled={isLoading}>
<FormLabel>Content</FormLabel>
<TextEditor
id="text-editor"
name="content"
value={inputData.content}
onChange={(newValue) =>
setInputData({ ...inputData, content: newValue })
}
/>
</FormControl>
<Flex width="100%" justify="end">
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@ import {
TabPanels,
Tabs,
} from '@/components/chakra';
import {
CustomEditable,
FormWrapper,
GoBackButton,
TextEditor,
} from '@/components/client';
import { CustomEditable, FormWrapper, GoBackButton } from '@/components/client';
import {
AddIcon,
ArrowUpIcon,
Expand Down Expand Up @@ -259,14 +254,6 @@ export const PostForm = ({

<FormControl id="text-editor" isDisabled={isLoading}>
<FormLabel>Content</FormLabel>
<TextEditor
id="text-editor"
name="content"
value={data.content}
onChange={(newValue) =>
setInputData({ ...data, content: newValue })
}
/>
</FormControl>
</Stack>
</TabPanel>
Expand Down
57 changes: 0 additions & 57 deletions apps/dashboard/components/client/TextEditor/index.tsx

This file was deleted.

1 change: 0 additions & 1 deletion apps/dashboard/components/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export * from './Providers';
export * from './SettingNav';
export * from './Sidebar';
export * from './Sidebar';
export * from './TextEditor';
export * from './VirtualTable';
export * from './CookiesProvider';
export * from './ErrorBoundary';
2 changes: 0 additions & 2 deletions apps/dashboard/env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ POSTGRES_URL_NON_POOLING="${POSTGRES_URL}"
POSTGRES_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:5432/${POSTGRES_DB}?schema=public"
POSTGRES_PRISMA_URL="${POSTGRES_URL}?pgbouncer=true&connect_timeout=15"

NEXT_PUBLIC_API_KEY_TINYMCE=""

EMAIL_SERVER_USER= # your email
EMAIL_SERVER_PASSWORD= # your password
EMAIL_SERVER_HOST= #smtp.gmail.com
Expand Down
4 changes: 1 addition & 3 deletions apps/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"@next-auth/prisma-adapter": "1.0.7",
"@prisma/client": "5.4.2",
"@sieutoc/cake-editor": "workspace:*",
"@tinymce/tinymce-react": "4.3.0",
"@types/negotiator": "0.6.1",
"@upstash/ratelimit": "0.4.4",
"@vercel/kv": "0.2.3",
Expand All @@ -41,8 +40,8 @@
"next": "13.5.6",
"next-auth": "4.24.3",
"next-client-cookies": "1.0.5",
"qs": "6.11.2",
"nodemailer": "6.9.6",
"qs": "6.11.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-fast-compare": "3.2.2",
Expand All @@ -52,7 +51,6 @@
"sanitize-html": "2.11.0",
"slugify": "1.6.6",
"swr": "2.2.4",
"tinymce": "6.7.1",
"uuid": "9.0.1"
},
"devDependencies": {
Expand Down
22 changes: 0 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e2b2ad5

Please sign in to comment.