https://github.com/danrpts/react-mdex
An ultralight library for building Markdown editors in React.
https://github.com/danrpts/react-mdex
editor library markdown react
Last synced: 2 months ago
JSON representation
An ultralight library for building Markdown editors in React.
- Host: GitHub
- URL: https://github.com/danrpts/react-mdex
- Owner: danrpts
- License: mit
- Created: 2018-09-27T06:55:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-17T01:06:09.000Z (over 6 years ago)
- Last Synced: 2025-03-17T11:10:02.242Z (3 months ago)
- Topics: editor, library, markdown, react
- Language: JavaScript
- Homepage: https://superdan.io/react-mdex/
- Size: 4.12 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-mdex
> An ultralight library for building Markdown editors in React - [Try it out!](https://superdan.io/react-mdex/)
[](https://www.npmjs.com/package/react-mdex) [](https://standardjs.com)

## Install
```bash
npm install --save react-mdex
```## Usage
```jsx
import React, { Component } from "react";
import MarkdownIt from "markdown-it";
import { Editor, EditorState, Preview } from "react-mdex";class BasicEditor extends Component {
constructor(props) {
super(props);this.state = {
editorState: new EditorState()
};this.onChange = editorState => {
this.setState({
editorState
});
};const md = MarkdownIt();
this.renderFn = md.render.bind(md);
}
render() {
return (
);
}
}
```## License
MIT © [danrpts](https://github.com/danrpts)