editor.js icon indicating copy to clipboard operation
editor.js copied to clipboard

[Bug] copy-and-paste formatted text does not preserve formatting

Open alxndr opened this issue 5 years ago • 5 comments

Steps to reproduce:

  1. Add text to editor instance
  2. Select a word and make it bold
  3. Select another word and make it a link
  4. Highlight the text
  5. Add a new text block, and paste the text
  6. Note that the text is pasted in without the bold formatting and link, and is also missing the space between the bolded word and the linked word (see screenshot)

Expected behavior:

  • the pasted text includes the bold formatting and link, and the space between the bolded word and linked word

Screenshots: Screen Shot 2021-07-15 at 13 23 32

Device, Browser, OS: Macbook with Mojave 10.14.6 , Firefox Dev Edition 90.0b12

Editor.js version: 2.22.1

Plugins you use with their versions:

    "@editorjs/embed": "2.4.0",
    "@editorjs/header": "2.6.1",
    "@editorjs/list": "1.6.2",
    "@editorjs/paragraph": "2.8.0",
    "@editorjs/underline": "1.0.0",
    "editorjs-strikethrough": "0.0.1",
    "editorjs-undo": "0.1.4",
    "@stfy/react-editor.js": "1.0.3",

alxndr avatar Jul 15 '21 20:07 alxndr

I have fix on it issue #1686. Waiting for approval :)

woren951 avatar Jul 16 '21 09:07 woren951

@woren951 wonderful, thank you!

alxndr avatar Jul 19 '21 18:07 alxndr

Thanks @woren951 for the fix!! Does it keep formatting from external text too? (e.g. Copy-paste from Wikipedia paragraph with links). Could you please approve it @gohabereg? Thanks guys, amazing stuff!! 💯

ittaboba avatar Aug 27 '21 17:08 ittaboba

is this still an ongoing issue?

hochiw avatar Oct 09 '25 08:10 hochiw

is this resolved ? or have any suggestion ?

ullaskunder02 avatar Feb 23 '26 09:02 ullaskunder02