## Media handling

Recommended plugin configuration for uploading via browser file selector is

```
{
    helpers: {
	  handleFileUpload: imageUploadHandler
	},
    config: {
      [VIDEO_TYPE]: {
        handleFileUpload: videoUploadHandler,
      },
      [AUDIO_TYPE]: {
        handleFileUpload: audioUploadHandler,
      },
      [FILE_UPLOAD_TYPE]: {
        onFileSelected: fileUploadHandler,
      },
    },
  };
```

And the recommended config for uploading via custom file selector is

```
  {
    helpers: {
	  handleFileSelection: imageSelectionHandler
	},
    config: {
      [VIDEO_TYPE]: {
        handleFilSelection: videoSelectionHandler,
      },
      [AUDIO_TYPE]: {
        handleFilSelection: audioSelectionHandler,
      },
      [FILE_UPLOAD_TYPE]: {
        handleFileSelection: fileSelectionHandler,
      },
    },
  };
```

Image and gallery plugins are both handled with a single function.
Supplying a handleFileSelection function will override the plugin's native file selector handler (e.g. for images - handleFileSelection overrides onFilesChange).

Please refer to Editor.js and EditorPlugins.js for examples.

## Adsense Support

In order to resolve this issue with adsense support - https://support.wix.com/en/article/adding-google-adsense-ads-to-blog-posts-in-the-new-wix-blog

An additional prop is needed both for Rich Content Editor & Rich Content Viewer

| Prop Name    | Type              | Description                                                                          |
| ------------ | ----------------- | ------------------------------------------------------------------------------------ |
| `siteDomain` | String (Full URL) | User's site URL - when present automatically adds the needed line to support adsense |
