DraftJS AWS Amplify S3 Plugin
This is a plugin for use with draft-js-plugins-editor
It is heavily inspired by the draft-js-image-plugin.
Assumptions
Peer Dependencies
Please note that using this plugin requires your project has aws-amplify
(not @aws-amplify/storage
), react
and react-dom
packages installed.
Peer Dependencies Motivation
DraftJS has peer dependencies on react
and react-dom
. Additionally, to successfully use hooks, the react
import from your application code needs to resolve to the same module as the react import from inside the react-dom
package.
Since the Amplify
module installed in your node_modules
is correctly configured (using Amplify.configure()
), this library hooks directly into that configuration via the peerDependency
.
Amplify Configuration
This plugin assumes you've successfully configured AWS Amplify
with an awsconfig
.
Example Usage
;;;; ;; // The Editor accepts an array of plugins. In this case, only the s3Plugin// is passed in, although it is possible to pass in multiple plugins.; ;