Skip to content

feat: add formatMenuConfig prop for per-item format submenu control#409

Open
hryhoriiK97 wants to merge 6 commits into
mainfrom
feat/input-format-menu-config
Open

feat: add formatMenuConfig prop for per-item format submenu control#409
hryhoriiK97 wants to merge 6 commits into
mainfrom
feat/input-format-menu-config

Conversation

@hryhoriiK97

@hryhoriiK97 hryhoriiK97 commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

What/Why?

Adds a new formatMenuConfig prop to EnrichedMarkdownTextInput that lets consumers control the visibility of individual items inside the "Format" submenu:

  • bold, italic, underline, strikethrough, spoiler, link

All fields default to true, so existing behavior is preserved when the prop is omitted.

Platforms: iOS, Android, macOS

Testing

Screenshots

Screen.Recording.2026-06-19.at.12.06.30.mov

PR Checklist

  • Code compiles and runs on iOS
  • Code compiles and runs on Android
  • Updated documentation/README if applicable
  • Ran example app to verify changes
  • E2E tests are passing
  • Required E2E tests have been added (if applicable)

…arkdownTextInput

Co-authored-by: Cursor <cursoragent@cursor.com>
@hryhoriiK97 hryhoriiK97 force-pushed the feat/input-format-menu-config branch from 08b82ae to d7d92e8 Compare June 19, 2026 09:11
@hryhoriiK97 hryhoriiK97 changed the title feat: add formatMenuConfig prop for per-item format submenu control (… feat: add formatMenuConfig prop for per-item format submenu control Jun 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new formatMenuConfig prop to EnrichedMarkdownTextInput to allow per-item visibility control within the native “Format” context-menu submenu (bold/italic/underline/strikethrough/spoiler/link) across iOS, Android, and macOS, while preserving existing behavior via defaults.

Changes:

  • Introduces FormatMenuConfig TS types, normalizes defaults in the JS wrapper, and plumbs the prop through the codegen native component interface.
  • Implements per-item visibility filtering in native context menu builders on iOS/macOS and Android.
  • Documents the new prop in docs/API_REFERENCE.md (plus an unrelated example app Podfile.lock checksum update).

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/react-native-enriched-markdown/src/index.tsx Re-exports the new FormatMenuConfig type from the public entrypoint.
packages/react-native-enriched-markdown/src/EnrichedMarkdownTextInputNativeComponent.ts Adds FormatMenuConfigInternal and a new required native prop formatMenuConfig for codegen.
packages/react-native-enriched-markdown/src/EnrichedMarkdownTextInput.tsx Adds the public formatMenuConfig prop, docs, and normalization to full boolean defaults before passing to native.
packages/react-native-enriched-markdown/ios/input/EnrichedMarkdownTextInput+Internal.h Defines ENRMFormatMenuConfig and exposes -formatMenuConfig accessor.
packages/react-native-enriched-markdown/ios/input/EnrichedMarkdownTextInput+ContextMenu.mm Filters Format submenu items based on formatMenuConfig (iOS + macOS paths).
packages/react-native-enriched-markdown/ios/input/EnrichedMarkdownTextInput.mm Stores/updates _formatMenuConfig from Fabric props and exposes accessor.
packages/react-native-enriched-markdown/android/src/main/java/com/swmansion/enriched/markdown/input/toolbar/InputContextMenu.kt Adds FormatMenuConfig and filters Android Format submenu items by style type.
packages/react-native-enriched-markdown/android/src/main/java/com/swmansion/enriched/markdown/input/EnrichedMarkdownTextInputManager.kt Adds the formatMenuConfig React prop setter to update the Android context menu config.
docs/API_REFERENCE.md Documents formatMenuConfig, its defaults, and an example usage.
apps/example/ios/Podfile.lock Updates several pod checksums (appears unrelated to the feature scope).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hryhoriiK97 hryhoriiK97 requested a review from eszlamczyk June 19, 2026 10:14
@hryhoriiK97 hryhoriiK97 marked this pull request as ready for review June 19, 2026 10:14

@eszlamczyk eszlamczyk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Base automatically changed from feat/input-selection-menu-config to main June 19, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants