Skip to content

Feature request: contentInset prop for EnrichedMarkdownTextInput (non-clipping internal inset) #426

Description

@andreavrr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions