-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image pasted from Word is not properly processed #27
Comments
I had another look, it's indeed related to the selection, that's not updated to move to another block after the image one has been removed. This would happen when the last item in the paste is an image, and also presumably on Apple Pages with nested list items if they were the last thing in the paste. I'm surprised it's only coming up now! |
# [2.2.0](v2.1.0...v2.2.0) (2019-01-22) ### Bug Fixes * **filters:** handle removal of all blocks, inserting one unstyled ([652750f](652750f)) * **filters:** move selection after filtering. Fix [#27](#27) ([df3b8a6](df3b8a6)) ### Features * **api:** expose applyContentWithSelection in the package API ([25d1983](25d1983))
🎉 This issue is fixed in v2.2.0, available on npm: [email protected]. Generated by 📦🚀 semantic-release |
Do you want to request a feature or report a bug?
Bug. See springload/draftail#179.
What is the current behavior?
Pasting a particular image formatting from Word, the content coming from the filters contains an image block that trips up the editor’s rendering.
Input document: draftail-crash-elon-musk-article.docx
Draft.js output on https://thibaudcolas.github.io/draftjs-filters/:
Without filters
With filters
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. GIFs and screenshots are very helpful too.
What is the expected behavior?
The editor shouldn't have to render problematic content. Either:
src
does not match the whitelist, and the selection should be placed on the last block of the paste.IMMUTABLE
, and should be followed by an empty block if needed to allow its selection (Filters should inject blocks before and afteratomic
blocks as required #14)The text was updated successfully, but these errors were encountered: