Skip to content

Expose TipTap suggestion matching options in UEditorSuggestionMenu (allowedPrefixes, startOfLine, etc.) #6233

@Archetipo95

Description

@Archetipo95

Package

v4.x

Description

UEditorSuggestionMenu currently does not expose TipTap Suggestion matching options such as allowedPrefixes, allowSpaces, allowToIncludeChar, and startOfLine.

Because of this, trigger matching is effectively fixed to TipTap defaults, for example allowedPrefixes = [' '], which means a trigger like : only works after whitespace or start-of-line.

This makes some valid editor use cases difficult, for example phonetic input inside markup like [word](/:/) where the trigger should work directly after / without a preceding space.

Proposed API

Option A: add a new prop to UEditorSuggestionMenu

  • suggestion?: Partial

Option B: add focused props for common matching controls

  • allowedPrefixes?: string[] | null
  • allowSpaces?: boolean
  • allowToIncludeChar?: boolean
  • startOfLine?: boolean

Thanks for your work!

I opened a PR with the Option A implementation here: #6234

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageAwaiting initial review and prioritizationv4#4488

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions