Move email editor components out of the engine folder
MAILPOET-6215
This commit is contained in:
committed by
Oluwaseun Olorunsola
parent
e6d607028c
commit
1c3ea9cd0a
14
packages/js/email-editor/src/editor-hooks.ts
Normal file
14
packages/js/email-editor/src/editor-hooks.ts
Normal 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
|
||||
);
|
||||
};
|
Reference in New Issue
Block a user