Skip to content
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

Pasting formatted content into text field while editing removes formatting #1605

Closed
barklund opened this issue May 6, 2020 · 1 comment · Fixed by #4600
Closed

Pasting formatted content into text field while editing removes formatting #1605

barklund opened this issue May 6, 2020 · 1 comment · Fixed by #4600
Labels
Elements: Text P0 Critical, drop everything Type: Bug Something isn't working

Comments

@barklund
Copy link
Contributor

barklund commented May 6, 2020

Bug Description

The current removal of formatting is intentional, as formatting would not otherwise be correctly converted to our new custom styles - but would rather use DraftJS built-in default styles, which would only cause confusion as those are not fully supported any longer.

Fixing this involves creating a custom handlePastedText callback.

This is a known consequence of PR #1323.

Expected Behaviour

  • When pasting formatted content (content with special font weight, color, font style, text decoration or letter spacing), the original styling should be preserved and appear identical in the editor.

Steps to Reproduce

  • Create a new Google Docs document.
  • Insert some text here, make some of it bold, some italic, some underline and some green.
  • Mark all the text and copy it to the system placeholder.
  • In the editor, insert a new text field
  • Click the text field to enter edit mode.
  • Paste the copied content.
  • Observe that the copied content is inserted, but without any formatting.

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance Criteria

QA Instructions

@csossi
Copy link

csossi commented Sep 21, 2020

Verified in QA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Elements: Text P0 Critical, drop everything Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants