I'm not confident if this will help you or not. But the way it was working for me was if I set the configuration as a property of my custom component. By passing the property to JodiEditor the error went away.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 406
- Forks
- 131
- Avg merge
- 2h 32m
- Merged PRs (30d)
- 2
Description
I'm not confident if this will help you or not. But the way it was working for me was if I set the configuration as a property of my custom component. By passing the property to JodiEditor the error went away.
class Editor extends Component {
onUpdateContent = (value) => {
this.props.dispatch(contentChange(value));
};
config = {
readonly: false,
minHeight: 500
};
render() {
return (
<JoditEditor
value={this.props.content}
config={this.config}
onChange={this.onUpdateContent}
/>
)
}
}
Originally posted by @vrielsa in https://github.com/jodit/jodit-react/issues/4#issuecomment-411830674
This is beautiful, in my case I did it that way:
config = {
readonly: false,
minHeight: 500,
"uploader": {
"insertImageAsBase64URI": true
},
"enter": "P",
"defaultMode": "1",
"buttons": "source |, bold, strikethrough, underline, italic, | ul, ol, outdent, indent, | font, fontsize, brush, | image, table |,align,undo,redo,\n,selectall,cut,copy,paste,eraser,copyformat,|,hr,symbol"
}
render(){
return(
<JoditEditor ref="longDescription"
id="longDescription"
value={this.state.longDescription}
config={this.config}
onBlur={newContent => { this.onEditorChange(newContent) }}
/>
)
}
note: longDescription is reference in my db firebase.
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 at the JoditEditor usage shown in the report and reproduce the error with the configuration passed directly versus stored as a component property. The report names no repository file or test, so first identify the relevant wrapper entry point and establish the expected behavior before making a change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100