Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wangzuo/react-medium-editor

React wrapper for medium-editor
https://github.com/wangzuo/react-medium-editor

Last synced: 6 days ago
JSON representation

React wrapper for medium-editor

Awesome Lists containing this project

README

        

# react-medium-editor

React wrapper for [medium-editor](https://github.com/daviferreira/medium-editor)

### Demo

[http://wangzuo.github.io/react-medium-editor](http://wangzuo.github.io/react-medium-editor)

### Installation

```sh
npm install react-medium-editor --save
```

### Usage

```javascript
// load theme styles with webpack
require('medium-editor/dist/css/medium-editor.css');
require('medium-editor/dist/css/themes/default.css');

// ES module
import Editor from 'react-medium-editor';

// CommonJS enviroment
// var Editor = require('react-medium-editor').default;

var App = React.createClass({
getInitialState() {
return { text: 'Fusce dapibus, tellus ac cursus commodo' };
},

render() {
return (


react-medium-editor


Html content


{this.state.text}

Editor #1 (<pre> tag)



Editor #2




);
},

handleChange(text, medium) {
this.setState({ text: text });
}
});
```

### License

MIT