MCPcopy Index your code
hub / github.com/resend/react-email / useEditorImage

Function useEditorImage

packages/editor/src/plugins/image/index.ts:24–35  ·  view source on GitHub ↗
(options: UseEditorImageOptions)

Source from the content-addressed store, hash-verified

22export type { UploadImageResult, UseEditorImageOptions } from './types';
23
24export function useEditorImage(options: UseEditorImageOptions) {
25 const uploadImageRef = useRef(options.uploadImage);
26 uploadImageRef.current = options.uploadImage;
27
28 return useMemo(
29 () =>
30 createImageExtension({
31 uploadImage: (file) => uploadImageRef.current(file),
32 }),
33 [],
34 );
35}

Callers 1

ImageUploadFunction · 0.90

Calls 1

createImageExtensionFunction · 0.90

Tested by

no test coverage detected