package
React Markdown Editor
npm install react-md-editorGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
A Markdown Editor for React.js, built with CodeMirror.
This is a work in progress. Format application and removal is not very robust, some formats are missing.
Live demo: JedWatson.github.io/react-md-editor
To build the examples locally, run:
npm install
npm startThen open localhost:8000 in a browser.
The easiest way to use codemirror is to install it from NPM and include it in your own React build process (using Browserify, Webpack, etc).
You can also use the standalone build by including dist/codemirror.js in your page. If you use this, make sure you have already included React, and it is available as a global variable.
npm install codemirror --savevar React = require('react'),
Editor = require('react-md-editor');
var App = React.createClass({
getInitialState: function() {
return {
code: "# Markdown"
};
},
updateCode: function(newCode) {
this.setState({
code: newCode
});
},
render: function() {
return <Editor value={this.state.code} onChange={this.updateCode} />
value String the markdownoptions Object (newValue) options passed to the CodeMirror instanceonChange Function (newValue) called when a change is madeSee the CodeMirror API Docs for the available options.
MIT. Copyright (c) 2016 Jed Watson.
Estimated unpacked size across 18 packages.
3.2 MB
Includes dependencies.