react-slate-small-editor
v1.0.0
Published
WYSIWYG small editor for react to use in comments or posts
Downloads
4
Readme
react-slate-small-editor
WYSIWYG Twitter-like comment editor for react
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