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

[lexical-plaintext] Feature: add escape key handler #5991

Closed jeffreyclu closed 1 week ago

jeffreyclu commented 2 weeks ago

Description

Adds the same escape key handler to the plain text package as exists in lexical/richtext.

Closes: #5922

Test plan

Before

In the plaintext playground, pressing Esc doesn't blur the editor.

https://github.com/facebook/lexical/assets/55211974/a34cdd6e-d0a4-483e-ae46-f80759b39340

After

In the plaintext playground, pressing Esc blurs the editor.

https://github.com/facebook/lexical/assets/55211974/3a219753-03c5-4c92-9eeb-d44ce421d112

vercel[bot] commented 2 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 30, 2024 2:57pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2024 2:57pm