ueberdosis / tiptap

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

[Bug]: Nested marks with styling are stripped by default #5720

Open bdbch opened 1 month ago

bdbch commented 1 month ago

Affected Packages

core

Version(s)

2.8.0

Bug Description

To give this issue a bit more context - see this discussion:

1815

Prosemirror seems to strip out font styles from nested text elements by default which causes a loss of text stylings when content is parsed into the editor that is structured like this:

<span style="font-size: 10px;">
  <span style="color: red;">This is red</span>
  <span style="color: blue;">This is blue</span>
</span>

Afaik this would lead to parsed HTML of

<span style="font-size: 10px; color: null;">This is redThis is blue</span>

Browser Used

Chrome

Code Example URL

No response

Expected Behavior

Spans should be kept to preserve attributes with context on specific text elements.

Additional Context (Optional)

No response

Dependency Updates