JSPM

  • Created
  • Published
  • Downloads 41899
  • Score
    100M100P100Q157851F
  • License MIT

Package Exports

  • react-simplemde-editor

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-simplemde-editor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React SimpleMDE Markdown Editor

React component wrapper for SimpleMDE.

New version 2.0

Version 1.0 did not have SimpleMDE options configured well, this readme reflects the changes made to better include options. This is still a very new project. Testing, feedback and PRs are welcome and appreciated.

Install

npm install --save react-simplemde-editor

Demo

http://www.benrlodge.com/projects/react-simplemde

or view it locally:

git clone https://github.com/benrlodge/react-simplemde-editor.git
cd react-simplemde-editor
npm install
cd demo
gulp
open browser to localhost:3000

Usage

View the demo code for a full example.

Not required, but useless without it, the onChange callback is the only option you need to set.

var React = require('react');
var SimpleMDE = require('react-simplemde-editor');

<SimpleMDE
  onChange={this.handleChange}
/>

Options

Set additional SimpleMDE options with an options prop.

var React = require('react');
var SimpleMDE = require('react-simplemde-editor');

<SimpleMDEReact
  onChange={this.handleChange}
  options={{
    autofocus: true,
    spellChecker: false,
    initialValue: this.state.textValue
    // etc.
  }}
/>