tiptap icon indicating copy to clipboard operation
tiptap copied to clipboard

feat(suggestion): add option to allow triggering chars to also be in suggestions

Open tcitworld opened this issue 2 years ago • 1 comments

Please describe your changes

It's currently not possible to mention emails or federated usernames for instance, because the triggering char (often @) cannot be included in the mention suggestion itself. This option allows to have some, so that the mention will only end with a space. That makes it incompatible with the allowSpaces option.

How did you accomplish your changes

Added the option in question and modified the regex matching the suggestion text to use it.

How have you tested your changes

Tested that the new regex will also include the part after a secondary triggering character.

How can we verify your changes

Add allowToIncludeChar to the suggestion settings, then type an email as suggestion.

Remarks

[add any additional remarks here]

Checklist

  • [x] The changes are not breaking the editor
  • [ ] Added tests where possible
  • [x] Followed the guidelines
  • [x] Fixed linting issues

Related issues

Closes #4447

tcitworld avatar Oct 24 '23 13:10 tcitworld

Deploy Preview for tiptap-embed ready!

Name Link
Latest commit 807c9a2e98cb981dadae49bfc95725a4273efa18
Latest deploy log https://app.netlify.com/sites/tiptap-embed/deploys/6537c9e07d1de600087a46d0
Deploy Preview https://deploy-preview-4561--tiptap-embed.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Oct 24 '23 13:10 netlify[bot]

Moved this into #5895

bdbch avatar Nov 30 '24 15:11 bdbch

Thanks !

tcitworld avatar Nov 30 '24 16:11 tcitworld