facebook / lexical

Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance.
https://lexical.dev
MIT License
17.5k stars 1.45k forks source link

Maintain text decoration styles on paste #5938

Closed Shubhankerism closed 3 weeks ago

Shubhankerism commented 3 weeks ago

Currently pasting text content (eg, from gDocs) with both underline and strikethrough formatting loses both these formatting styles. This PR fixes that issue.

The text-decoration property's value can be a string that's a combination of different values like underline and line-through (eg: text-decoration: underline line-through;), hence modified the logic accordingly.

Before

text-decor-before

After

text-decor-after

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 3:20pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 3:20pm