Skip to content
Snippets Groups Projects
Commit 7cb933e2 authored by chris's avatar chris
Browse files

add missing file

parent 1d32cec7
No related branches found
No related tags found
No related merge requests found
/* eslint-disable react/prop-types */
import React, { useContext } from 'react';
import { v4 as uuidv4 } from 'uuid';
import { WaxContext } from 'wax-prosemirror-core';
import { isEmpty } from 'lodash';
import fileUpload from '../fileUpload';
import ImageUpload from './ImageUpload';
const ImageUploadComponent = ({ view, displayed, config, pmplugins, item }) => {
const context = useContext(WaxContext);
if (isEmpty(view)) return null;
const upload = fileUpload(
view,
config.get('fileUpload'),
pmplugins.get('imagePlaceHolder'),
context,
);
return displayed ? (
<ImageUpload
fileUpload={upload}
item={item.toJSON()}
key={uuidv4()}
view={view}
/>
) : null;
};
export default ImageUploadComponent;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment