sstur / draft-js-export-markdown

DraftJS: Export ContentState to Markdown
http://npm.im/draft-js-export-markdown
55 stars 23 forks source link

Image export is not working #6

Closed grzyb closed 8 years ago

grzyb commented 8 years ago

Steps to reproduce the issue

If you try to export an image inserted using DraftJS, the block with the image is not present in the markdown output. This is because the IF clause that is supposed to convert the image block is never possible due to differences in case (one side is 'image', the other is 'IMAGE' and there's a === between them).

The if clause should look like this (line 240): if (entity != null && entity.getType().toLowerCase() === _draftJsUtils.ENTITY_TYPE.IMAGE.toLowerCase()) {

Would have done it myself, but no rights to access repo.

sstur commented 8 years ago

The fix for this is now landed. Thanks for the PR!