Skip to content

ntgussoni/react-slate-medium-editor

Repository files navigation

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