I tried to get updated string from editor, but not getting last character from editor. I tried on blur, onchange also but not getting.
import React from 'react';import 'jodit';import JoditEditor from "jodit-react";import "../src/JoditEditors.css"class JoditEditors extends React.Component {constructor(props) {
super(props);
this.state = {
test: 'content',
};}componentDidUpdate() {
}componentDidMount() {}updateContent = (value) => {
this.setState({ test: value })
console.log(this.state.test);}newsetContent = (dds) => {
console.log(dds);}shoot() {
this.updateContent();
console.log(this.state.test);}jodit;setRef = jodit => this.jodit = jodit;config = {readonly: false}render() {
return (
<div>
<JoditEditor
editorRef={this.setRef}
value={this.state.test}
config={this.config}
//onBlur={newContent => this.newsetContent(newContent)}
// onBlur={() => this.newsetContent(this.state.test)}
onChange={this.updateContent}
/>
<button onClick={() => { this.shoot() }} >Take the shot!</button>
</div>
); }}export default JoditEditors;