MCPcopy Index your code
hub / github.com/mdx-editor/editor

github.com/mdx-editor/editor @v4.0.4 sqlite

repository ↗ · DeepWiki ↗ · release v4.0.4 ↗
668 symbols 1,549 edges 178 files 55 documented · 8%
README

MDXEditor

npm npm bundle size (scoped)

Because markdown editing can be even more delightful.

MDXEditor is an open-source React component that allows users to author markdown documents naturally. Just like in Google docs or Notion. See the live demo that has all features turned on. The component supports the core markdown syntax and certain extensions, including tables, images, code blocks, etc. It also allows users to edit JSX components with a built-in JSX editor or a custom one.

import {MDXEditor, headingsPlugin} from '@mdxeditor/editor';
import '@mdxeditor/editor/style.css';

export default function App() {
  return <MDXEditor markdown={'# Hello World'} plugins={[headingsPlugin()]} />;
}

Get Started

The best place to get started using the component is the documentation.

Help and support

If you find a bug, check if something similar is not reported already in the issues. If not, create a new issue.

If you're integrating the component in your commercial project and need dedicated assistance with your issues in exchange of sponsorship, contact me over email.

If you want to discuss ideas start a discussion in the Discussions section.

License

MIT © Petyo Ivanov.

Extension points exported contracts — how you extend this code

MetaData (Interface)
* Metadata that is provided to the visitors
src/importMarkdownToLexical.ts
TokenTypeMap (Interface)
(no doc)
src/mdastUtilHtmlComment.ts
ToMarkdownOptions (Interface)
(no doc)
src/exportMarkdownFromLexical.ts
RealmPlugin (Interface)
(no doc)
src/RealmWithPlugins.tsx
MDXEditorMethods (Interface)
(no doc)
src/MDXEditor.tsx
VoidEmitter (Interface)
(no doc)
src/utils/voidEmitter.ts
GenericJsxEditorProps (Interface)
(no doc)
src/jsx-editors/GenericJsxEditor.tsx
EditorThemeClasses (Interface)
(no doc)
src/@types/lexical/index.d.ts

Core symbols most depended-on inside this repo

Cell
called by 85
src/plugins/table/TableEditor.tsx
getValue
called by 50
src/plugins/jsx/LexicalMdxExpressionNode.tsx
useTranslation
called by 29
src/plugins/core/index.ts
append
called by 25
src/importMarkdownToLexical.ts
realmPlugin
called by 24
src/RealmWithPlugins.tsx
normalizeCodeBlockLanguages
called by 24
src/plugins/codemirror/index.tsx
Appender
called by 16
src/plugins/core/index.ts
join
called by 13
src/exportMarkdownFromLexical.ts

Shape

Function 437
Method 135
Interface 76
Class 20

Languages

TypeScript100%

Modules by API surface

src/importMarkdownToLexical.ts29 symbols
src/plugins/table/TableNode.tsx28 symbols
src/plugins/image/ImageNode.tsx28 symbols
src/plugins/codeblock/CodeBlockNode.tsx24 symbols
src/plugins/search/index.tsx23 symbols
src/exportMarkdownFromLexical.ts22 symbols
src/plugins/image/index.ts20 symbols
src/plugins/core/GenericHTMLNode.tsx20 symbols
src/examples/basics.tsx19 symbols
src/plugins/jsx/LexicalMdxExpressionNode.tsx18 symbols
src/plugins/jsx/LexicalJsxNode.tsx18 symbols
src/plugins/directives/DirectiveNode.tsx17 symbols

Dependencies from manifests, versioned

@babel/core7.23.7 · 1×
@babel/plugin-transform-react-jsx7.23.4 · 1×
@babel/plugin-transform-typescript7.23.6 · 1×
@babel/preset-react7.23.3 · 1×
@babel/preset-typescript7.23.3 · 1×
@codemirror/commands6.2.4 · 1×
@codemirror/lang-markdown6.2.3 · 1×
@codemirror/language-data6.5.1 · 1×
@codemirror/merge6.4.0 · 1×
@codemirror/state6.4.0 · 1×
@codemirror/view6.23.0 · 1×
@ladle/react5.1.1 · 1×

For agents

$ claude mcp add editor \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact