ntgussoni / react-slate-medium-editor

WORK IN PROGRESS- PRs welcome!
https://ntgussoni.github.io/react-slate-medium-editor/
7 stars 2 forks source link
react slatejs wysiwyg-editor

react-slate-medium-editor

WYSIWYG Medium-like editor for react

NPM JavaScript Style Guide

WORK IN PROGRESS

Install

npm install --save react-slate-medium-editor

Usage

import React, { Component } from "react";
import { ReactSlateMediumEditor } from "react-slate-medium-editor";

class Example extends Component {
  state = {
    value: null
  };

  onChange = value => {
    this.setState({ value });
  };

  render() {
    return (
      <ReactSlateMediumEditor
        onChange={this.onChange}
        value={value}
        onFileSelected={file => someFunction(file)}
      />
    );
  }
}

License

MIT © ntgussoni