FAQ¶
Have a question that isn't part of the FAQ? Open an issue in our GitHub repository.
Common Questions¶
How do I get development snapshots?¶
Add the snapshots repository to your list of repositories in build.gradle.kts
:
allprojects {
repositories {
maven("https://s01.oss.sonatype.org/content/repositories/snapshots")
}
}
Or to your dependency resolution management in settings.gradle.kts
:
dependencyResolutionManagement {
repositories {
maven("https://s01.oss.sonatype.org/content/repositories/snapshots")
}
}
Use the snapshot version:
⚠️ Warning: Snapshots are deployed for each new commit on main
that passes CI. They can potentially contain breaking changes or may be unstable. Use at your own risk.
How do I customize the appearance of links?¶
You can customize link appearance using the config
property of RichTextState
:
richTextState.config.linkColor = Color.Blue
richTextState.config.linkTextDecoration = TextDecoration.Underline
How do I handle link clicks?¶
By default, links are opened by your platform's UriHandler
. To handle links yourself:
val myUriHandler = remember {
object : UriHandler {
override fun openUri(uri: String) {
// Your custom link handling logic
}
}
}
CompositionLocalProvider(LocalUriHandler provides myUriHandler) {
RichText(
state = richTextState,
modifier = Modifier.fillMaxWidth()
)
}
How do I save/restore editor content?¶
You can convert the editor content to HTML or Markdown for storage: