Closed ericandrewlewis closed 1 year ago
If you paste plain text (i.e. paste from the URL bar or Emacs) it seems to add the link mark to the pasted text.
If you paste html that holds just text, it keeps the markup (i.e. no link) from the pasted content.
Are you suggesting there should be some logic to recognize HTML that holds just text, and treat that as a text insertion rather than a paste of already-styled content? Or do you think context marks should always be added to pasted content? (Only inline content, or also pastes that span multiple blocks?)
I think I confused myself. The existing behavior seems fine as-is, thanks for taking a look.
Consider a document that has a link in it:
If you copy and paste plain text into the link, the link is split:
This is unexpected to me. I'd expect the pasted plain text to become part of the link.
I believe the
doPaste()
method is related.I notice this in Chrome on Mac, although would guess the behavior applies to other browsers as well.
You can reproduce this in the editor on the homepage.