-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Description
when saving the image in react-draft-wysiwyg I get the following output as html:
<div style="text-align:right;"><img src="srcHere" alt="" style="height: auto;width: auto"/></div>
after converting this back to the EditorState and logging out html again I receive:
<p style="text-align:right;"></p> <img src="srcHere" alt="" style="height: auto;width: auto"/>
The image position is lost and wrapping div is converted into adjacent empty p element with same styling as div.
the code that converts the html back to EditorState:
...
const contentBlock = htmlToDraft(fieldHtml);
const contentState = ContentState.createFromBlockArray(contentBlock.contentBlocks);
return EditorState.createWithContent(contentState);
I imagine this might be similar if not the same issue as #98
Metadata
Metadata
Assignees
Labels
No labels