File size: 710 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import type { CellPlugin } from '@react-page/editor';
import { lazyLoad, ImageUploadType } from '@react-page/editor';
import createPlugin from './createPlugin';
import ImageHtmlRenderer from './Renderer/ImageHtmlRenderer';
import type { ImageSettings } from './types/settings';
import type { ImageState } from './types/state';
const ImageControls = lazyLoad(() => import('./Controls/ImageControls'));
const imagePlugin: (
settings?: Partial<ImageSettings>
) => CellPlugin<ImageState> = (settings) =>
createPlugin({
Renderer: ImageHtmlRenderer,
Controls: ImageControls,
...settings,
});
const image = imagePlugin();
export default image;
export { ImageUploadType };
export { imagePlugin };
|