You are here

React.js - wysiwyg editor

Install:

npm install react-wysiwyg-editor

Usage:
Add at the top of the js file:

var EditableDiv = require('react-wysiwyg-editor');

The editor field:

render: function() {
    // Customize your editor with css rules
    var editorStyle = {
        overflow: 'auto',
        width: 300,
        height: 100,
        maxHeight: 100
    }
    return(
        <div className="form-group">
            <label>Comment:</label>
            <EditableDiv style={editorStyle} />
        </div>
    );
}
code type: 
Taken from: 
https://www.npmjs.com/package/react-wysiwyg-editor