Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const WysiwygEditor = ({onContentChange}) => {
const {publicRuntimeConfig} = getConfig()
const {FILESTACK_KEY} = publicRuntimeConfig
const options = {
fromSources: ['webcam', 'video'],
maxSize: 1024 * 1024,
maxFiles: 1,
}
const filestack = client.init(FILESTACK_KEY, options);
const handleEditorChange = (e) => {
const content = e.target.getContent()
console.log('Content was updated:', content);
onContentChange(content)
}
return (
componentDidMount() {
const {
setFileName,
setError,
setDragged,
} = this.props;
this.filestack = filestack.init(config.FILESTACK.API_KEY);
setFileName('');
setError('');
setDragged(false);
}