Problem
There's no way to give EnrichedMarkdownTextInput an internal, non-clipping vertical inset. There is no contentInset prop, and style padding is not a substitute:
- Android: it maps to
TextView padding, which clips the text at the padding band while the content scrolls.
- iOS: the input doesn't apply it as a text inset at all (no
padding prop on the input; textContainerInset is left at the default and isn't exposed).
So a top/bottom cushion that scrolls together with the content (e.g. under a translucent header, or above a keyboard-sticky toolbar) can't be achieved today.
Proposal
Add a contentInset prop ({ top, right, bottom, left }) to EnrichedMarkdownTextInput:
- iOS: map it to
UITextView.contentInset. Since UITextView is a UIScrollView, this is non-clipping by nature.
- Android: apply an equivalent non-clipping inset at the scroll/layout level (not as
TextView padding, which clips mid-scroll).
Prior art
The closed PR #208 added contentInset to the read-only display component (EnrichedMarkdown / EnrichedMarkdownText), not the input. This request is specifically for the editable EnrichedMarkdownTextInput.
Use case
Rich-text editor with a translucent navigation header and a keyboard-sticky formatting toolbar: it needs a top/bottom cushion that doesn't clip the text at a fixed band.
Problem
There's no way to give
EnrichedMarkdownTextInputan internal, non-clipping vertical inset. There is nocontentInsetprop, andstylepadding is not a substitute:TextViewpadding, which clips the text at the padding band while the content scrolls.paddingprop on the input;textContainerInsetis left at the default and isn't exposed).So a top/bottom cushion that scrolls together with the content (e.g. under a translucent header, or above a keyboard-sticky toolbar) can't be achieved today.
Proposal
Add a
contentInsetprop ({ top, right, bottom, left }) toEnrichedMarkdownTextInput:UITextView.contentInset. SinceUITextViewis aUIScrollView, this is non-clipping by nature.TextViewpadding, which clips mid-scroll).Prior art
The closed PR #208 added
contentInsetto the read-only display component (EnrichedMarkdown/EnrichedMarkdownText), not the input. This request is specifically for the editableEnrichedMarkdownTextInput.Use case
Rich-text editor with a translucent navigation header and a keyboard-sticky formatting toolbar: it needs a top/bottom cushion that doesn't clip the text at a fixed band.