react-slate-small-editor

1.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i react-slate-small-editor

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

224 kB

Total Files

6

Last publish

Collaborators

  • ntgussoni