Skip to content

What to do with "unknown colors" showing up from external HTMLΒ #2181

@nperez0111

Description

@nperez0111

Describe the bug

When pasting in external HTML (or setting it via an initial document JSON). There can be textColor or backgroundColor which is a value other than the color names which we already support (e.g. red, blue, etc).

This is originally found to be an issue with this PR: #2179

To Reproduce

initialContent={ [ { type: "paragraph", props: { textColor: "rgba(0, 0, 0, 0.5)" } } ] }

By explicitly setting the textColor to an invalid value, it is preserved in the document when it should likely be stripped as invalid? Perhaps the zod props parsing introduced by #2096 will resolve this issue?

Misc

  • Node version: N/A
  • Package manager: N/A
  • Browser: N/A
  • I'm a sponsor and would appreciate if you could look into this sooner than later πŸ’–

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions