Draft-js: DraftJS with s3 image upload

Created on 26 Nov 2019  路  5Comments  路  Source: facebook/draft-js

Hello,

Is it possible to use this editor for the following;

  • h1-h6 styles, bold, italic and links buttons (Appears so)
  • Allowing images to be added, and aligned but the image should be uploaded to an s3 bucket as part of the saving process

If not, is there any other editors that work with ReactJS and could do this? My stack is NextJS + Material-UI + Hapi.

Many thanks... I did look through the awesome draft repo, but I couldnt determine where images went.

Most helpful comment

Hey @bonbonio. I made a quick plugin for draft-js called draft-js-aws-amplify-s3 that _may_ help you.

All 5 comments

You need to write your own handler for image uploads or use some of the community plugins.

In reality, if you're looking for a more robust solution for a text editor, you should check out other packages, as this one is barely maintained and requires lots of configuration to make it work.

Check out https://www.draft-js-plugins.com/, they seem to have a plug-in for adding images. I haven't used them myself, but the Alignment + Resize + Focus + Drag'n'Drop + Drag'n'Drop Upload Example section sounds like what you need.

Hey @bonbonio. I made a quick plugin for draft-js called draft-js-aws-amplify-s3 that _may_ help you.

Hey @bonbonio. I made a quick plugin for draft-js called draft-js-aws-amplify-s3 that _may_ help you.

I鈥檒l take a look this weekend! Awesome news though!

@bonbonio Great. It's super young so don't be _too_ harsh. :stuck_out_tongue_closed_eyes:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ktjd123 picture ktjd123  路  3Comments

eessex picture eessex  路  3Comments

jackmatrix picture jackmatrix  路  3Comments

ufo22940268 picture ufo22940268  路  3Comments

vierno picture vierno  路  3Comments