Skip to content

Conversation

@bmspereira-07
Copy link
Contributor

Description

Add mentions functionality to the core Rich Editor form field

Visual changes

image

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@github-project-automation github-project-automation bot moved this to Todo in Roadmap Aug 22, 2025
@bmspereira-07 bmspereira-07 changed the title Add mentions to rich editor [v4] Add mentions to rich editor Aug 22, 2025
@bmspereira-07 bmspereira-07 changed the title [v4] Add mentions to rich editor [v4.x] Add mentions to rich editor Aug 23, 2025
@bmspereira-07 bmspereira-07 changed the title [v4.x] Add mentions to rich editor [4.x] Add mentions to rich editor Aug 23, 2025
@danharrin danharrin added enhancement New feature or request pending review labels Aug 25, 2025
@danharrin danharrin added this to the v4 milestone Aug 25, 2025

return {
editor: tiptapEditor,
char: '@',
Copy link
Contributor

Choose a reason for hiding this comment

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

It could be cool to be able to customize the character.

Copy link
Member

Choose a reason for hiding this comment

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

@ is quite common. What other char do you have in mind?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@saade
Copy link
Member

saade commented Aug 28, 2025

It would be cool to have an API just like select does.

->getMentionSearchResultsUsing(
    fn (string $search): array => User::query()
            ->where('name', 'like', "%{$search}%")
            ->limit(50)
            ->pluck('name', 'id')
            ->all()
)

This would allow dynamic searching and not have to return all the mentionables from the database.

@bmspereira-07
Copy link
Contributor Author

It would be cool to have an API just like select does.

->getMentionSearchResultsUsing(
    fn (string $search): array => User::query()
            ->where('name', 'like', "%{$search}%")
            ->limit(50)
            ->pluck('name', 'id')
            ->all()
)

This would allow dynamic searching and not have to return all the mentionables from the database.

That would be cool

@bmspereira-07
Copy link
Contributor Author

Hey there! I updated the pull request with some changes, now you can add multiple symbols with the respective items and a global function to limit the number of results it shows when your using the mentions.

@GregoireGaonach
Copy link

It would be great to get mentions back in the rich editor like it was with awcodes/filament-tiptap-editor. I'm rooting for this PR!

Copy link
Member

@danharrin danharrin left a comment

Choose a reason for hiding this comment

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

I would accept this if it allowed a server request to load mention search results. Otherwise, I think the scope is quite limited as loading every user into JS in a large app would be slow.

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Roadmap Sep 16, 2025
Copy link
Member

@danharrin danharrin left a comment

Choose a reason for hiding this comment

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

Hey @bmspereira-07! Just wanted to check in here, would you mind reviewing my work here and seeing if you hit any issues? Thanks!

@danharrin danharrin merged commit ebb61d6 into filamentphp:4.x Jan 7, 2026
23 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Roadmap Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

9 participants