Skip to content

Commit 0940b42

Browse files
committed
Add onRichSpanClick to Outline
1 parent d63b539 commit 0940b42

File tree

1 file changed

+8
-0
lines changed
  • sample/common/src/commonMain/kotlin/com/mohamedrejeb/richeditor/sample/common/richeditor

1 file changed

+8
-0
lines changed

sample/common/src/commonMain/kotlin/com/mohamedrejeb/richeditor/sample/common/richeditor/RichEditorContent.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,14 @@ fun RichEditorContent() {
178178
OutlinedRichTextEditor(
179179
modifier = Modifier.fillMaxWidth(),
180180
state = outlinedRichTextState,
181+
onRichSpanClick = { span, range, offset ->
182+
println("clicked")
183+
if (span is SpellCheck) {
184+
println("Spell check clicked")
185+
println("Range: $range")
186+
println("Offset: $offset")
187+
}
188+
}
181189
)
182190
}
183191

0 commit comments

Comments
 (0)