Move email editor components out of the engine folder

MAILPOET-6215
This commit is contained in:
Oluwaseun Olorunsola
2024-11-11 09:41:48 +01:00
committed by Oluwaseun Olorunsola
parent e6d607028c
commit 1c3ea9cd0a
96 changed files with 12 additions and 12 deletions

View File

@@ -0,0 +1,14 @@
import { ComponentType } from 'react';
import { MediaUpload } from '@wordpress/media-utils';
import { addFilter } from '@wordpress/hooks';
export const initHooks = (): void => {
// see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/media-upload/README.md
const replaceMediaUpload = (): ComponentType => MediaUpload;
addFilter(
'editor.MediaUpload',
'mailpoet/email-editor/replace-media-upload',
replaceMediaUpload
);
};