Farhazul Mullick
10/23/2024, 8:30 AMmarkdown-material3 = {module = "com.mikepenz:multiplatform-markdown-renderer-m3", version.ref = "textMarkDown"}
markdown = {module = "com.mikepenz:multiplatform-markdown-renderer", version.ref = "textMarkDown"}
MarkdownText(
content = translationText,
style = lTexts.bodyTinyNormalDevnagri,
)
Getting this excepion.
java.lang.IllegalStateException: CompositionLocal ReferenceLinkHandler not present
at com.mikepenz.markdown.compose.ComposeLocalKt$LocalReferenceLinkHandler$1.invoke(ComposeLocal.kt:37)
at com.mikepenz.markdown.compose.ComposeLocalKt$LocalReferenceLinkHandler$1.invoke(ComposeLocal.kt:36)
Farhazul Mullick
10/23/2024, 8:32 AMStylianos Gakis
10/23/2024, 9:03 AMCompositionLocalProvider(ReferenceLinkHandler provides {{Your Impl Here}}) {
yourAppHere()
}
Farhazul Mullick
10/23/2024, 9:06 AMStylianos Gakis
10/23/2024, 9:11 AMFarhazul Mullick
10/23/2024, 9:47 AMMarkDown()
composable which defines all the necessary CompositionLocalProvider variables. MarkdownText()
composable fn should to be internally call by library because it access data via composition.curent .Mike Penz
10/23/2024, 12:48 PMMarkdown()
function is the correct top level one for using the library.
Please see the reference in the README: https://github.com/mikepenz/multiplatform-markdown-renderer?tab=readme-ov-file#usage
Small note: Be aware of the import. as the material2 or material3 provide different default themes.
The internal ones are exposed, as different use-cases might require more fine grained behavior. And various projects have modified behavior, which they required to have access to the base components as well.Farhazul Mullick
10/29/2024, 11:55 AM