konecny-ondrej / compose-markdown-editor

Wysiwyg Markdown editor component for Compose Multiplatform and components to build similar editors.
MIT License
6 stars 0 forks source link

Support for @mentions with dropdown support and replacement #1

Open LaatonWalaBhoot opened 1 month ago

LaatonWalaBhoot commented 1 month ago

@konecny-ondrej Apologies since this is more of a discussion than issue. Since its not mentioned in the readme. Does this library support @mentions support for adding and removing MentionSpans while typing in TextField? Congratulations on some great work!

PS: Does this have iOS support?

konecny-ondrej commented 1 month ago

I have enabled Discussions so the next suggestion can be discussed there. Anyway this lib does not use TextField at all, all the text is rendered as InteractiveText composables according what the Flexmark parser returns (it is BasicText with some modifiers) and I style them in MarkdownView. Flexmark supports GfmUser extension. That being said it should be reasonably simple to implement the support for rendering @mention. As for autocompletion - this already designed with plugins in mind, so implementing another autocomplete plugin for user metnions should not be a problem - even without changes to the lib. So you can implement this yourself in your app, if you can do without the special rendering for now. Even emoji autocompletion is implemented as a plugin now. Regarding iOS support - I only have a Linux laptop to test, so the project is currently only developed on Linux/desktop/JVM. Also I need to write some automated tests before I get to supporting anything else...

Thanks for the encouragement :-)