RichEditor minRows()/maxRows() support - #20258
Conversation
Signed-off-by: Dennis Koch <info@pixelarbeit.de>
Signed-off-by: Dennis Koch <info@pixelarbeit.de>
danharrin
left a comment
There was a problem hiding this comment.
Unlike a textarea where line height is fixed, the rich editor has a variety of line heights based on the element used (heading, paragraph) like the markdown editor.
The markdown editor has min/max height, right? So should we not mirror that pattern for the rich editor instead of min/max rows?
|
You're right, it's probably the better variant. I only compared it to the Textarea and forgot about the MarkdownEditor. I still like the idea of "rows" for a simple RichEditor but I can just pass the |
Signed-off-by: Dennis Koch <info@pixelarbeit.de>
|
The approach I took is a bit different from the markdown editor. While that one works via JS I decided to use plain CSS. Because we need to apply the height restrictions to the content and not the outer field container, I pass them down via CSS vars. Might look a bit weird but works. |
Description
Textareanatively supports->rows()but there was no option forRichEditorso far. Since this is not a native feature, I thought it was useful to add both min and max limits. It useslhunit which is supported in baseline: https://caniuse.com/wf-lhVisual changes
CleanShot.2026-07-22.at.21.58.29.mp4
Functional changes
composer cscommand.