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.
wangzuo

Description

React wrapper for medium-editor

455 Stars 87 Forks MIT License 72 Commits 24 Opened issues

Services available

Need anything else?

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.