Feature: maxLength for read-only mode
- Dominant language
- TypeScript
- Stars
- 23.9k
- Forks
- 2.2k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 61
Description
We are using Lexical for our app in both editable and read-only mode. So far, really good! We use the in-built read-only mode to display content the user has submitted. A new requirement arose that content in the read-only mode needed to be trimmed to n places. I tried modifying the maxLength plugin from #2230 but with read-only and a default editor value, I couldn't make it work.
Ideally we would like to use this feature to show a snippet of a longer user submitted introduction text and show the entirety of the text in a separate dialog.
Contributor guide
Research direction
Start by reviewing the maxLength plugin referenced in #2230 and how Lexical handles read-only mode with a default editor value. Confirm how a length limit should apply in read-only mode, then verify that longer submitted text is trimmed while content at or below the limit remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100