-
-
Notifications
You must be signed in to change notification settings - Fork 4k
[4.x] Add mentions to rich editor #17483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.x] Add mentions to rich editor #17483
Conversation
|
|
||
| return { | ||
| editor: tiptapEditor, | ||
| char: '@', |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like this maybe https://tiptap.dev/docs/editor/extensions/nodes/mention#suggestions.
|
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 |
…7/filament-v4 into add-mentions-to-rich-editor
|
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. |
|
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! |
danharrin
left a comment
There was a problem hiding this 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.
danharrin
left a comment
There was a problem hiding this 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!
Description
Add mentions functionality to the core Rich Editor form field
Visual changes
Functional changes
composer cscommand.