slate icon indicating copy to clipboard operation
slate copied to clipboard

Incorrect behaviour when inserting a fragment that crosses multiple blocks

Open mikerhyssmith opened this issue 3 years ago • 0 comments

Description If a multi block fragment is pasted within the middle of a paragraph rather than merging with the paragraph and inserting the block it combines all of the text from the fragment and inserts it into the block the selection is in

If you select text first then paste it behaves correctly

Recording 2022-08-19 10 42 12

Sandbox I used the Huge Document example to test this https://www.slatejs.org/examples/huge-document

Steps

  1. Go to https://www.slatejs.org/examples/huge-document
  2. Select a fragment that goes across multiple paragraphs
  3. Place your cursor within another paragraph and press paste
  4. View that the text is merged into that paragraph rather than creating the paragraphs

Expectation Expected behaviour within word - the separation between blocks is kept within the pasted fragment 2022-08-19 10 50 45

Environment

  • Slate Version: 0.82.0

mikerhyssmith avatar Aug 19 '22 09:08 mikerhyssmith