Skip to content

Paste HTML adds several blank lines and positions the caret in the wrong spot #4268

@itsameandrea

Description

@itsameandrea

Description
I was adding slate to a CMS when I noticed that pasting rich text content would add blank lines above and below the content and would position the caret in the wrong spot. I copied the code from the "Paste HTML" example

Recording
PaZXSFUUqj

Sandbox
https://www.slatejs.org/examples/paste-html

Steps
To reproduce the behavior:

  1. Go to here
  2. Paste rich text content as shown in the GIF

Expectation
I would expect to have the caret at the end of the pasted content without any additional blank line

Environment

  • Slate Version: 0.62
  • Operating System: Mac OS
  • Browser: Chrome

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions