draft-js-import-html icon indicating copy to clipboard operation
draft-js-import-html copied to clipboard

Handle content with not tags in correct order

Open wildseansy opened this issue 7 years ago • 2 comments

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

wildseansy avatar Aug 18 '16 17:08 wildseansy

Encountered the same issue in my project.

injune1123 avatar Oct 17 '16 18:10 injune1123

+1 Same problem

luiscoms avatar Feb 14 '17 02:02 luiscoms