A React-based Markdown editor with TypeScript support, built with shadcn UI and Tailwind CSS
npm install nexo-mdx --save # or bun install nexo-mdx # or pnpm add nexo-mdx
/* Applying */ .nexo-mdx-editor{ @apply ...; } .nexo-mdx-editor .editor-container{ @apply ...; } .nexo-mdx-editor .editor-container textarea{ @apply ...; } .nexo-mdx-editor .toolbar{ @apply ...; } .nexo-mdx-editor .toolbar .toolbar_left{ @apply ...; } .nexo-mdx-editor .toolbar .toolbar_left .toolbar_preview_icon{ @apply ...; } .nexo-mdx-editor .toolbar .toolbar_left .toolbar_preview_title{ @apply ...; } .nexo-mdx-editor .toolbar .toolbar_left .toolbar_preview_description{ @apply ...; } .nexo-mdx-editor .toolbar .toolbar_right { @apply ...; } .nexo-mdx-editor .toolbar .toolbar_left p svg{ @apply ..; } .nexo-mdx-editor .toolbar .button{ @apply ...; }
import React, { useState } from 'react'; import MdxEditor from 'nexo-mdx'; export function Editor() { const [mdValue, setMdValue] = useState(''); return ( <MdxEditor value={mdValue} onChange={(value, _) => setMdValue(value)} /> ); }