Skip to content

Commit

Permalink
Upgrade to latest next/mdxeditor
Browse files Browse the repository at this point in the history
  • Loading branch information
petyosi committed Jan 4, 2024
1 parent 9f7905c commit 314ad6a
Show file tree
Hide file tree
Showing 4 changed files with 883 additions and 1,138 deletions.
11 changes: 4 additions & 7 deletions app/globals.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/**
* Tailwind removes all styling, includling the headings, so disabling this.
* You can use the prose plugin for tailwind for better styling.
*/
/* @tailwind base; */
@tailwind components;
@tailwind utilities;
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
@import '../node_modules/@mdxeditor/editor/dist/style.css';
11 changes: 8 additions & 3 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@ import { Suspense } from 'react'
const EditorComp = dynamic(() => import('./EditorComponent'), { ssr: false })

const markdown = `
# Hello world!
Check the EditorComponent.tsx file for the code .
Hello **world**!
`

export default function Home() {
return (
<div>Editor:
<>
<p>This is a bare-bones unstyled MDX editor without any plugins and no toolbar. Check the EditorComponent.tsx file for the code.</p>
<p>To enable more features, add the respective plugins to your instance - see <a className="text-blue-600" href="https://mdxeditor.dev/editor/docs/getting-started">the docs</a> for more details.</p>
<br />
<div style={{border: '1px solid black'}}>
<Suspense fallback={null}>
<EditorComp markdown={markdown} />
</Suspense>
</div>
</>
)
}
Loading

0 comments on commit 314ad6a

Please sign in to comment.