Skip to content

ntgussoni/react-slate-small-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

eecdc29 · Sep 11, 2019

History

45 Commits
Apr 17, 2019
May 13, 2019
Sep 11, 2019
May 9, 2019
Feb 27, 2019
May 9, 2019
Sep 11, 2019
Feb 27, 2019
May 10, 2019
May 13, 2019
May 11, 2019
May 11, 2019

Repository files navigation

react-slate-small-editor

WYSIWYG Twitter-like comment editor for react

NPM JavaScript Style Guide

WORK IN PROGRESS

Install

npm install --save react-slate-small-editor

Usage

import React, { Component } from "react";
import { ReactSlateSmallEditor } from "react-slate-small-editor";

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

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

  render() {
    return (
      <ReactSlateSmallEditor
        onChange={this.onChange}
        value={value}
        onFileSelected={async file => upload(file)}
        maxCharacterCount={maxCharacterCount}
        renderCount={count => `${count} / ${maxCharacterCount}`}
      />
    );
  }
}

License

MIT © ntgussoni