sstur / draft-js-import-html

62 stars 18 forks source link

Handle content with not tags in correct order #13

Open wildseansy opened 8 years ago

wildseansy commented 8 years ago

If you import HTML that doesn't have any tags wrapping the outer content, the outer content (with no tags) is placed at the beginning of the editor.

Example: screen shot 2016-08-18 at 10 33 46 am

Perhaps this breaks an assumption that ALL content should be wrapped in tags. However, content generated from other rich text editors doesn't always export the cleanest of HTML, and would be nice to just treat all top-level content with no tags as <p> tags, to maintain the order of the content.

This allows a cleaner migration of application saved markup content to use draft-js/react-rte

injune1123 commented 8 years ago

Encountered the same issue in my project.

luiscoms commented 7 years ago

+1 Same problem