signavio / react-mentions

@mention people in a textarea
https://react-mentions.vercel.app
Other
2.4k stars 560 forks source link

feat(tracking): allow mention tracking to be turned off, turning the … #722

Open djMax opened 7 months ago

djMax commented 7 months ago

…input into more of a macro expander

What did you change (functionally and technically)?

Instead of inserting the markup into the formatted (and unformatted) values, if trackMentions is false, it will just insert the display-formatted value in both, which allows editing of the FULL text in the text area instead of what happens now. Before this change, if you try to edit the text "in" a mention, it will just delete the whole mention. In our use case it is more of a macro-expander, and thus this breaks the expectations a user would have. There are probably more complex solutions available by messing with applyChangeToValue, but I don't feel confident making those changes.

vercel[bot] commented 7 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-mentions ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 15, 2023 9:41pm
changeset-bot[bot] commented 7 months ago

🦋 Changeset detected

Latest commit: 7af88d260154f5b94e11156e57019223130781b3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | -------------- | ----- | | react-mentions | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR