sstur / draft-js-utils

DraftJS: import/export ContentState to and from HTML/Markdown
ISC License
883 stars 234 forks source link

Override rendering of ENTITY_TYPE.IMAGE #101

Open MykolaGolubyev opened 7 years ago

MykolaGolubyev commented 7 years ago

Hello, Is it possible to change the way Image gets rendered as HTML? For my task it would be enough to override ENTITY_ATTR_MAP for the image.

More context: I am using Image Alignment plugin (https://www.draft-js-plugins.com/plugin/alignment) and need to propagate align property to the generated html

jpvalenciag commented 6 years ago

Hey could you get around this? I'm trying to do the same... The align is not saved in the HTML, so when I convert it back to edtiorState I loose the alignment.