
Rich text editing with plain and block editors, inline formatting, custom emoji, hyperlinks, tables, smart paste, JSON serialization, undo/redo, and floating toolbars for integrated UI components.
If you want to try out the component on the webpage, you can clickWebsite
ComposeRichEditor is a Compose Multiplatform rich text editor library for Android, iOS, Desktop, and Web. It provides a plain rich text editor, a block-based rich text editor, rich text formatting, custom emoji rendering, hyperlink support, table editing, smart paste, JSON serialization, and cross-platform editor UI components.
Status:
0.1.0-alpha01is available on Maven Central. APIs may still change before a stable release.
| Module | Artifact | Status | Description |
|---|---|---|---|
richtext-core |
io.github.taocent:compose-richtext-core |
Alpha | Core state, formatting, paragraph model, emoji, paste, serialization, platform adapters, and shared UI internals. |
richtext |
io.github.taocent:compose-richtext |
Alpha | Ready-to-use rich text editor composables, toolbar, panels, and dialogs. |
blockrichtext |
io.github.taocent:compose-block-richtext |
Alpha / Experimental | Block-based editor with text blocks, tables, block navigation, and shared floating toolbar behavior. |
shared, androidApp, desktopApp, webApp, iosApp
|
Not published | Sample | Demo applications and integration samples for supported platforms. |
| Platform | Status | Notes |
|---|---|---|
| Android | Supported | Main mobile target; IME, selection, toolbar, and clipboard paths are actively tested. |
| iOS | Supported | Uses platform-specific IME composition handling for stable Chinese/Japanese/Korean input. |
| Desktop JVM | Supported | Supports keyboard selection, toolbar behavior, and rich text editing. |
| Web | Experimental | Build target exists; browser input and clipboard behavior may vary. |
The first public alpha is available on Maven Central:
dependencies {
implementation("io.github.taocent:compose-richtext-core:0.1.0-alpha01")
implementation("io.github.taocent:compose-richtext:0.1.0-alpha01")
implementation("io.github.taocent:compose-block-richtext:0.1.0-alpha01")
}For local development, include the modules directly from this repository:
dependencies {
implementation(project(":richtext-core"))
implementation(project(":richtext"))
implementation(project(":blockrichtext"))
}import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import com.taocent.simple.compose.component.richtext.RichTextEditor
import com.taocent.simple.compose.component.richtext.rememberRichTextState
@Composable
fun EditorScreen() {
val state = rememberRichTextState()
RichTextEditor(
state = state,
modifier = Modifier.fillMaxSize(),
placeholder = "Start writing..."
)
}import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import com.taocent.simple.compose.component.blockrichtext.BlockRichTextEditor
import com.taocent.simple.compose.component.blockrichtext.ExperimentalBlockRichTextApi
import com.taocent.simple.compose.component.blockrichtext.rememberBlockState
@OptIn(ExperimentalBlockRichTextApi::class)
@Composable
fun BlockEditorScreen() {
val state = rememberBlockState()
BlockRichTextEditor(
state = state,
modifier = Modifier.fillMaxSize()
)
}The block editor APIs are marked with ExperimentalBlockRichTextApi in the alpha series. Opt in at the smallest practical scope, such as the screen or wrapper composable that owns BlockState.
BasicTextField and AnnotatedString.blockrichtext is more experimental than the plain richtext editor and requires ExperimentalBlockRichTextApi opt-in.Run core checks:
./gradlew :richtext-core:jvmTest
./gradlew :richtext:jvmTest
./gradlew :blockrichtext:jvmTestCompile common and JVM targets:
./gradlew :richtext-core:compileKotlinMetadata :richtext:compileKotlinJvm :blockrichtext:compileKotlinJvmCompile iOS simulator targets:
./gradlew :richtext-core:compileKotlinIosSimulatorArm64 :richtext:compileKotlinIosSimulatorArm64 :blockrichtext:compileKotlinIosSimulatorArm64Run sample apps:
./gradlew :androidApp:assembleDebug
./gradlew :desktopApp:run
./gradlew :webApp:wasmJsBrowserDevelopmentRunOpen iosApp in Xcode to run the iOS sample.
docs/ before the first public release.ComposeRichEditor follows semantic versioning after the stable 1.0.0 release. Before 1.0.0, minor versions and alpha releases may contain breaking API changes.
Contributions are welcome. Please read CONTRIBUTING.md before opening an issue or pull request.
Please report security issues according to SECURITY.md.
ComposeRichEditor is licensed under the Apache License 2.0.
If you want to try out the component on the webpage, you can clickWebsite
ComposeRichEditor is a Compose Multiplatform rich text editor library for Android, iOS, Desktop, and Web. It provides a plain rich text editor, a block-based rich text editor, rich text formatting, custom emoji rendering, hyperlink support, table editing, smart paste, JSON serialization, and cross-platform editor UI components.
Status:
0.1.0-alpha01is available on Maven Central. APIs may still change before a stable release.
| Module | Artifact | Status | Description |
|---|---|---|---|
richtext-core |
io.github.taocent:compose-richtext-core |
Alpha | Core state, formatting, paragraph model, emoji, paste, serialization, platform adapters, and shared UI internals. |
richtext |
io.github.taocent:compose-richtext |
Alpha | Ready-to-use rich text editor composables, toolbar, panels, and dialogs. |
blockrichtext |
io.github.taocent:compose-block-richtext |
Alpha / Experimental | Block-based editor with text blocks, tables, block navigation, and shared floating toolbar behavior. |
shared, androidApp, desktopApp, webApp, iosApp
|
Not published | Sample | Demo applications and integration samples for supported platforms. |
| Platform | Status | Notes |
|---|---|---|
| Android | Supported | Main mobile target; IME, selection, toolbar, and clipboard paths are actively tested. |
| iOS | Supported | Uses platform-specific IME composition handling for stable Chinese/Japanese/Korean input. |
| Desktop JVM | Supported | Supports keyboard selection, toolbar behavior, and rich text editing. |
| Web | Experimental | Build target exists; browser input and clipboard behavior may vary. |
The first public alpha is available on Maven Central:
dependencies {
implementation("io.github.taocent:compose-richtext-core:0.1.0-alpha01")
implementation("io.github.taocent:compose-richtext:0.1.0-alpha01")
implementation("io.github.taocent:compose-block-richtext:0.1.0-alpha01")
}For local development, include the modules directly from this repository:
dependencies {
implementation(project(":richtext-core"))
implementation(project(":richtext"))
implementation(project(":blockrichtext"))
}import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import com.taocent.simple.compose.component.richtext.RichTextEditor
import com.taocent.simple.compose.component.richtext.rememberRichTextState
@Composable
fun EditorScreen() {
val state = rememberRichTextState()
RichTextEditor(
state = state,
modifier = Modifier.fillMaxSize(),
placeholder = "Start writing..."
)
}import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import com.taocent.simple.compose.component.blockrichtext.BlockRichTextEditor
import com.taocent.simple.compose.component.blockrichtext.ExperimentalBlockRichTextApi
import com.taocent.simple.compose.component.blockrichtext.rememberBlockState
@OptIn(ExperimentalBlockRichTextApi::class)
@Composable
fun BlockEditorScreen() {
val state = rememberBlockState()
BlockRichTextEditor(
state = state,
modifier = Modifier.fillMaxSize()
)
}The block editor APIs are marked with ExperimentalBlockRichTextApi in the alpha series. Opt in at the smallest practical scope, such as the screen or wrapper composable that owns BlockState.
BasicTextField and AnnotatedString.blockrichtext is more experimental than the plain richtext editor and requires ExperimentalBlockRichTextApi opt-in.Run core checks:
./gradlew :richtext-core:jvmTest
./gradlew :richtext:jvmTest
./gradlew :blockrichtext:jvmTestCompile common and JVM targets:
./gradlew :richtext-core:compileKotlinMetadata :richtext:compileKotlinJvm :blockrichtext:compileKotlinJvmCompile iOS simulator targets:
./gradlew :richtext-core:compileKotlinIosSimulatorArm64 :richtext:compileKotlinIosSimulatorArm64 :blockrichtext:compileKotlinIosSimulatorArm64Run sample apps:
./gradlew :androidApp:assembleDebug
./gradlew :desktopApp:run
./gradlew :webApp:wasmJsBrowserDevelopmentRunOpen iosApp in Xcode to run the iOS sample.
docs/ before the first public release.ComposeRichEditor follows semantic versioning after the stable 1.0.0 release. Before 1.0.0, minor versions and alpha releases may contain breaking API changes.
Contributions are welcome. Please read CONTRIBUTING.md before opening an issue or pull request.
Please report security issues according to SECURITY.md.
ComposeRichEditor is licensed under the Apache License 2.0.