Open pramodshri opened 3 years ago
Hello @pramodshri ,
this is true - Spanned
is returned in the API. In fact it is actually SpannableStringBuilder
, so you could cast to a Spannable
. I know it doesn't look like a good solution, but this is what we have now. With a safety in mind the code could be:
final Spannable spannable = spanned instanceof Spannable
? (Spannable) spanned
: new SpannableString(spanned);
So, we are implementing a search feature and we want to highlight part of the text (the search text) with a Background Span. I am here to get some guidance on how I can inject a span to the
Markwon
text. I see that thetoMarkdown()
method returns aSpanned
object which doesn't give us any options to set more spans on it.Looking forward to hearing from you!