Comments (13)
Hi,
This is one of the missing features of the library, I try to provide this in the next release.
Thanks for the detailed suggestions.
from compose-rich-editor.
Hi,
Thank you for considering of this feature in the next release!
In the meantime, I was wondering if you could share an estimated release date for the next version? Having a rough timeline would help me plan my implementation accordingly.
Additionally, while awaiting the official implementation, do you have any suggestions for alternative methods to observe the '@' character in the text editor? I'd appreciate any guidance or workaround you might have in mind.
Thank you once again for your attention to this matter.
from compose-rich-editor.
Hopefully at the end of this week or the next week.
I think that it's possible now to observe the @ by observing any change and do some text manipulation. Something like this:
LaunchedEffect(state.selection, state.annotatedString) {
// Use the current text and the cursor position to look for the first @ char before the cursor and then you can get the data that you want.
}
from compose-rich-editor.
Yes by your given suggestion I am able to observe text, but same way I want to observe that text is getting deleted because in mine case I want to hide Mention popup once someone is deleting @ from Editor. Can you suggest me something.
from compose-rich-editor.
Yes I think that you can do it with the same approach. I would suggest saving the @ index when it gets added to distinguish between multiple mentions. So let's say that you detected that there's an @ before the cursor, save that position when you open the popup, then if the cursor position is lower than the saved mention position, you hide the popup.
from compose-rich-editor.
I feel storing index of @ will be costly operation because any time user can change anything from contain I have to keep updating my @ index also.
from compose-rich-editor.
You can save it when you open the popup, just with the action of opening the popup. Then if the popup is opened and the cursor position is lower than the @ position, you can close the popup.
from compose-rich-editor.
yes that might be easier solution. Thanks
from compose-rich-editor.
@MohamedRejeb this feature you are releasing it in this week Right ?
from compose-rich-editor.
@MohamedRejeb I tried doing this by using Visual Transformation but got nowhere. The offset mapping usually results in regression. Plus deleting items completely screws up spans. There is no span listener in normal textFields. I have searched everywhere, there does not seem to be any working solution for compose anywhere
from compose-rich-editor.
Hi,
The needed APIs for this feature are already implemented but internal for now, I will see if it's possible to expose them with some improvements.
from compose-rich-editor.
https://github.com/linkedin/Spyglass This is already implemented for EditTexts. If you want to have a look at the API design.
I am able to trigger suggestion on @ but adding and removing spans is causing all sorts of issues
from compose-rich-editor.
@MohamedRejeb Any timeline on this feature? It is highly requested by compose users and I don't think there is an existing solution
from compose-rich-editor.
Related Issues (20)
- Lists indent HOT 4
- RichTextEditor Problem for Editing the current state with parsing html content HOT 3
- When calling state.setHtml(html) method for rendering a HTML Ordered list , each <li> tag is rendered as a new Ordered list HOT 2
- should support span id HOT 3
- Padding after html tag HOT 6
- How to highlight a different part of the text depending on the text and the current caret position? HOT 1
- Span style resets to default after deleting all characters HOT 2
- Link Removal Issue
- Publish snapshots HOT 1
- Font size change (Increase or decrease) HOT 1
- Math expressions
- Math expressions HOT 3
- Why setConfig deprecated HOT 2
- Add an ability to select the text in read-only mode HOT 1
- Bulleted list render with ul/li html tags HOT 3
- Built-in editor HOT 2
- -[MTLTextureDescriptorInternal validateWithDevice:]:1357: failed assertion `Texture Descriptor Validation MTLTextureDescriptor has height (>8192) greater than the maximum allowed size of 8192. HOT 6
- FontFamily.Monospace doesn't seem to work for Web?
- Add new features
- When listIndent is set to 0, the number of the ordered list will disappear
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compose-rich-editor.