You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to change the text colour of a list of dots.
I am creating my custom class inheriting from TagHandler and in the handle method I am doing the following:
override fun handle(visitor: MarkwonVisitor, renderer: MarkwonHtmlRenderer, tag: HtmlTag) {
val info = extractValue(tag.attributes()["style"] ?: "")
if(tag.name() == "span"){
visitor.builder().setSpan(
ForegroundColorSpan(safeParseColor(info.trim())),
tag.start(),
tag.end()
)
}else if(tag.name() == "ul"){
val list = tag.asBlock.children()
if(list.isNotEmpty()){
list.forEach {
visitor.builder().setSpan(
ForegroundColorSpan(safeParseColor(info.trim())),
it.start(),
it.end())
}
}
}
}
but the result I get is that it paints the text in the expected colour but the list is lost, i.e. it becomes a normal text with the colour changed.
any help please ?
The text was updated successfully, but these errors were encountered:
I want to change the text colour of a list of dots.
I am creating my custom class inheriting from TagHandler and in the handle method I am doing the following:
but the result I get is that it paints the text in the expected colour but the list is lost, i.e. it becomes a normal text with the colour changed.
any help please ?
The text was updated successfully, but these errors were encountered: