1.0.0 • Published 5 years ago

react-slate-small-editor v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

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