Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
bdbch opened this issue Oct 11, 2024 · 1 comment
Closed
1 task done

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

bdbch opened this issue Oct 11, 2024 · 1 comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug

Comments

@bdbch
Copy link
Member

bdbch commented Oct 11, 2024

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

  • Yes, I've updated all my dependencies.
@bdbch bdbch added Type: Bug The issue or pullrequest is related to a bug Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. labels Oct 11, 2024
@nperez0111
Copy link
Contributor

We've got a fix for this #5897

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug
Projects
None yet
Development

No branches or pull requests

2 participants