ueberdosis / tiptap

The headless rich text editor framework for web artisans.
https://tiptap.dev
MIT License
27.26k stars 2.27k forks source link

[Bug]: Paste does not contain text/background color #5476

Open Gregoor opened 2 months ago

Gregoor commented 2 months ago

Affected Packages

core

Version(s)

2.6.0

Bug Description

When copying rich text from another editor (e.g. Word) neither text nor background color are retained. It works as expected for bold, italic, underline and strike-through.

Browser Used

Chrome

Code Example URL

No response

Expected Behavior

The text/background color seen in the source editor should make it over into tiptap.

Additional Context (Optional)

No response

Dependency Updates

nperez0111 commented 2 months ago

@Gregoor Did this work in prior versions? I'm unsure that we ever supported copying colors from word.

Do note you need the text-style, color and highlight extensions for this to work

Gregoor commented 2 months ago

@nperez0111 I think it did not work in previous versions (but I can't speak for many versions)

I tested background color (/highlight) against the official examples as well (https://tiptap.dev/docs/editor/extensions/marks/highlight) where it also did not work, so I think it's really not working.