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
478 Stars 95 Forks MIT License 72 Commits 24 Opened issues

Description

React wrapper for medium-editor

Services available

!
?

Need anything else?

Contributors list

# 55,371
React
react-c...
CSS
HTML
52 commits
# 210,947
JavaScr...
ruby-on...
Python
sublime
4 commits
# 174,561
JavaScr...
man-in-...
mitmpro...
coffees...
1 commit
# 372,665
JavaScr...
React
1 commit
# 8,053
Node.js
TypeScr...
React
modal-d...
1 commit
# 369,580
JavaScr...
CSS
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.