editure-react
v0.1.13
Published
React-specific components, plugins and hooks for editure.
Readme
Editure for React
The React component for Editure.
Using the Component
A quick demo:
import Editure from 'editure-react';
class MyComponent extends React.Component {
constructor(props) {
super(props);
this.state = { value: [] };
}
handleChange = value => {
this.setState({ value });
};
render() {
return <Editure value={this.state.value} onChange={this.handleChange} />;
}
}Or, if you prefer Hooks:
import Editure from 'editure-react';
function MyComponent() {
const [value, setValue] = useState([]);
return <Editure value={value} onChange={setValue} />;
}