react-froala-wysiwyg
react-froala-wysiwyg copied to clipboard
How to pass dynamic parameters in autosave
In react hooks, the editor is created, but I found that the saveParams in config cannot be passed in dynamically, is there any way to pass in saveParams dynamically?
export default function GoEdit(props){
const config={
quickInsertEnabled:false,
height:"500",
saveURL: 'http://localhost:3000/save',
saveParams: {
id: props.id // How does this Id dynamically change
},
saveParam: 'content',
saveMethod: 'POST',
saveInterval: 6000*5,
}
return (<Editor
config={config}
style={{height:"100%"}}
/>);
}
I want the id parameter to be a different value every time I save it