This commit is contained in:
parent
f532a992e1
commit
0c08e7d230
|
@ -5,17 +5,18 @@ import ImageUpload from '@/app/_ui/ImageUpload';
|
|||
import { faArrowLeft, faRibbon } from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { BackTop, Button, Card, Col, DatePicker, Form, Grid, Input, InputNumber, message, Row, Select, Space, Upload } from 'antd';
|
||||
import dynamic from 'next/dynamic';
|
||||
import { useParams, useRouter } from 'next/navigation'
|
||||
|
||||
import { useState } from 'react';
|
||||
// const MDEditor = dynamic(() => import('@uiw/react-md-editor'), { ssr: false });
|
||||
import { MdEditor } from 'md-editor-rt';
|
||||
import 'md-editor-rt/lib/style.css';
|
||||
import '@ant-design/v5-patch-for-react-19';
|
||||
import { mRequest } from '@/app/_lib/request';
|
||||
import dayjs from 'dayjs';
|
||||
import {Editor} from "@bytemd/react";
|
||||
import gfm from '@bytemd/plugin-gfm'
|
||||
|
||||
const plugins = [
|
||||
gfm(),
|
||||
// Add more plugins here
|
||||
]
|
||||
export default function AddOrEdit({ editData }: { editData?: ArticleType | null }) {
|
||||
const router = useRouter()
|
||||
console.log(editData);
|
||||
|
@ -148,7 +149,9 @@ export default function AddOrEdit({ editData }: { editData?: ArticleType | null
|
|||
}
|
||||
]}>
|
||||
{/* <MDEditor className='my-markdown ' /> */}
|
||||
<MdEditor />
|
||||
<Editor
|
||||
plugins={plugins} value={''}
|
||||
/>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item className="flex justify-end">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
@import "tailwindcss";
|
||||
|
||||
@import 'bytemd/dist/index.css';
|
||||
:root {
|
||||
--background: #f9f9f9;
|
||||
--foreground: #171717;
|
||||
|
|
12
package.json
12
package.json
|
@ -3,7 +3,7 @@
|
|||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"dev": "next dev --turbopack",
|
||||
"build": "next build",
|
||||
"pro-build": "node --max-old-space-size=1024 node_modules/next/dist/bin/next build",
|
||||
"start": "next start",
|
||||
|
@ -12,6 +12,8 @@
|
|||
"dependencies": {
|
||||
"@ant-design/icons": "^5.5.2",
|
||||
"@ant-design/nextjs-registry": "^1.0.2",
|
||||
"@bytemd/plugin-gfm": "^1.22.0",
|
||||
"@bytemd/react": "^1.22.0",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
||||
"@fortawesome/react-fontawesome": "^0.2.2",
|
||||
|
@ -21,9 +23,9 @@
|
|||
"ali-oss": "^6.22.0",
|
||||
"antd": "^5.23.2",
|
||||
"bcrypt": "^5.1.1",
|
||||
"bytemd": "^1.22.0",
|
||||
"clsx": "^2.1.1",
|
||||
"dayjs": "^1.11.13",
|
||||
"icons": "link:@awesome.me/kit-KIT_CODE/icons",
|
||||
"jose": "^5.9.6",
|
||||
"jotai": "^2.11.1",
|
||||
"md-editor-rt": "^5.2.2",
|
||||
|
@ -49,5 +51,11 @@
|
|||
"postcss": "^8.5.1",
|
||||
"tailwindcss": "^4.0.4",
|
||||
"typescript": "^5"
|
||||
},
|
||||
"pnpm": {
|
||||
"onlyBuiltDependencies": [
|
||||
"bcrypt",
|
||||
"sharp"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
8698
pnpm-lock.yaml
8698
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue