Comments (6)
Here found the "codesandbox" project link for NextJs framework: https://codesandbox.io/s/nextjs-example-react-md-editor-qjhn7?file=/pages/index.js
Export the project as .zip from "codesandbox" and extract to your desired location
navigate to the extracted directory and use the "npm install" command to install all the dependencies.
"npm run dev" to run the project
from react-md-editor.
@Hassaan016 I am still getting the error in terminal:
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
event - compiled client and server successfully in 2.1s (128 modules)
wait - compiling / (client and server)...
(node:35985) [DEP_WEBPACK_MODULE_ISSUER] DeprecationWarning: Module.issuer: Use new ModuleGraph API
(Use `node --trace-deprecation ...` to show where the warning was created)
error - ./node_modules/@uiw/react-markdown-preview/esm/styles/markdown.css
Global CSS cannot be imported from within node_modules.
Read more: https://nextjs.org/docs/messages/css-npm
Location: node_modules/@uiw/react-markdown-preview/esm/index.js
Could not find files for / in .next/build-manifest.json
Could not find files for / in .next/build-manifest.json
This is my package.json
file:
{
"name": "client",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@uiw/react-markdown-preview": "4.0.5",
"@uiw/react-md-editor": "3.11.0",
"bootstrap": "^5.1.3",
"next": "12.0.10",
"next-remove-imports": "1.0.6",
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"@types/node": "17.0.34",
"@types/react": "^17.0.2",
"@types/react-dom": "17.0.2",
"eslint": "8.15.0",
"eslint-config-next": "12.1.6",
"typescript": "4.6.4"
}
}
And this is my text-editor.tsx
file:
import "@uiw/react-md-editor/markdown-editor.css";
import "@uiw/react-markdown-preview/markdown.css";
import dynamic from "next/dynamic";
import { useState } from "react";
const MDEditor = dynamic(
() => import("@uiw/react-md-editor").then((mod) => mod.default),
{ ssr: false }
);
const EditerMarkdown = dynamic(
() =>
import("@uiw/react-md-editor").then((mod) => {
return mod.default.Markdown;
}),
{ ssr: false }
);
const Markdown = dynamic(
() => import("@uiw/react-markdown-preview").then((mod) => mod.default),
{ ssr: false }
);
function HomePage() {
const [value, setValue] = useState("**Hello world!!!**");
return (
<div data-color-mode='dark'>
<MDEditor value={value} onChange={setValue} />
<div style={{ paddingTop: 50 }}>
<Markdown source={value} />
</div>
<EditerMarkdown source={value} />
</div>
);
}
export default HomePage;
from react-md-editor.
Is there an update to this? I'm running into the same issue
from react-md-editor.
same problem
from react-md-editor.
Same problem
from react-md-editor.
@Frostbourn @fervillalbag @JasonAtallah
from react-md-editor.
Related Issues (20)
- THIS IS NOT AN ISSUE: HACK to Paste Image directly from clipboard HOT 2
- The editor is stuck When value is large HOT 1
- 工具栏提示如何设置中文 HOT 2
- Spell Checker/ Auto Correct? HOT 1
- 预览标题的时候可以屏蔽链接标识吗 HOT 1
- Missing Source Map Files for parse5 in hast-util-raw Dependencies HOT 4
- How can i set textarea(.w-md-editor-text-input)'s parent <div> height style? HOT 4
- IMPORTANT MISSING FEATURE: Prop to limit the character length - maxLength and minLength attributes HOT 2
- [BUG] numbered list can't render number in preview panel HOT 3
- How to have hashtags render as links? HOT 3
- 预览模式下换行符显示问题 HOT 2
- 自适应高度时,切到preview模式,高度没了 HOT 6
- Change font size of editor HOT 1
- css variables 藏在哪里了找不到 HOT 1
- code highlight and rendering style seems not to work well in mac m1 HOT 1
- I need to check why my text is not being properly converted to markdown
- 有没有办法自定义一个toolbar组件 点击弹出dialog 的效果 而不是内嵌到toolbar children 里面的? HOT 2
- is it possible add embedded youtube video in editor ? HOT 7
- Unable to Embed Github gist HOT 3
- Select Specific Languages for Code Highlighting
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-md-editor.