File tree Expand file tree Collapse file tree
android/src/main/java/com/richtext Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package com.richtext
22
33import android.content.Context
44import android.graphics.Color
5- import android.graphics.Typeface
65import android.text.method.LinkMovementMethod
76import android.util.AttributeSet
87import androidx.appcompat.widget.AppCompatTextView
@@ -54,13 +53,15 @@ class RichTextView : AppCompatTextView {
5453 val document = parser.parseMarkdown(markdown)
5554 if (document != null ) {
5655 val styledText = renderer.renderDocument(document, onLinkPressCallback)
57- setText( styledText)
56+ text = styledText
5857 movementMethod = LinkMovementMethod .getInstance()
5958 } else {
60- text = " Error parsing markdown - Document is null"
59+ android.util.Log .e(" RichTextView" , " Failed to parse markdown - Document is null" )
60+ text = " "
6161 }
6262 } catch (e: Exception ) {
63- text = " Error: ${e.message} "
63+ android.util.Log .e(" RichTextView" , " Error parsing markdown: ${e.message} " )
64+ text = " "
6465 }
6566 }
6667
You can’t perform that action at this time.
0 commit comments