I have been integrating Jodit-react to my react-typescript project but when I am adding config prop to it. It is giving an error as "Has no property common with type."
I dont know what is the issue with typescript.
Code:
const config={
placeholder:"start typing...."
}
inside return block:
<JoditEditor ref={editor} value={content} onChange={newContent=>setContent(newContent)} config={config}/>
I think you didn't set the type of config
.
So I think there are two way - first way is to set config type using interface
and second way is to use any
type.
const config: any ={
placeholder:"start typing...."
}