Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I don't think this is ready to merge yet, but take a look at the current approach.
I added a new listener:
RichSpanClickListener
Which gets clicks on all
RichSpans
, and lets the user sort them out.I have an example in
RichEditorContent.kt
using this new listener to show a popup simulating a spellchecker.However
getRichSpanByOffset()
only seems to work in theBasicRichTextEditor
, The Outline variant which I think has extra padding maybe? The clicks return the wrong span. It appears to me to be offset by maybe the amount of padding? Not sure.In order to make all of this work I had to make more classes public, which might be fine? But if we decide we don't want to expose all of those internal workings, maybe we'd have some stripped down classes to return instead in the click listener?