Need help with react-medium-editor?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

wangzuo
467 Stars 93 Forks MIT License 72 Commits 24 Opened issues

Description

React wrapper for medium-editor

Services available

!
?

Need anything else?

Contributors list

# 50,431
React
react-c...
CSS
HTML
52 commits
# 201,547
JavaScr...
ruby-on...
Python
sublime
4 commits
# 173,630
man-in-...
mitmpro...
coffees...
React
1 commit
# 366,736
React
JavaScr...
1 commit
# 6,865
JavaScr...
Node.js
Redux
modal-d...
1 commit
# 357,417
CSS
HTML
1 commit

react-medium-editor

React wrapper for medium-editor

Demo

http://wangzuo.github.io/react-medium-editor

Installation

npm install react-medium-editor --save

Usage

// 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}

    <h3>Editor #1 (&lt;pre&gt; tag)</h3>
    <editor tag="pre" text="{this.state.text}" onchange="{this.handleChange}" options="{{" toolbar: buttons:></editor>
    <h3>Editor #2</h3>
    <editor text="{this.state.text}" onchange="{this.handleChange}"></editor>
  </div>
);

},

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

License

MIT

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.