last character not updating in this jodit editor
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 406
- Forks
- 131
- Avg merge
- 2h 32m
- Merged PRs (30d)
- 2
Description
i tried below example code , when i se on change last character is not updating & i tried to click button click also there also last character is missing. Help me on this.
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 // all options from https://xdsoft.net/jodit/doc/
}
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;
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided JoditEditors example, focusing on the JoditEditor onChange handler, component state, and the button callback. Reproduce the missing-last-character behavior and verify that the latest editor content is present in state and in the button output when the issue is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100