From 0940b4238799df19a9d6c1d0266db2a4de908908 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Sun, 24 Nov 2024 23:10:51 -0800 Subject: [PATCH] Add onRichSpanClick to Outline --- .../sample/common/richeditor/RichEditorContent.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sample/common/src/commonMain/kotlin/com/mohamedrejeb/richeditor/sample/common/richeditor/RichEditorContent.kt b/sample/common/src/commonMain/kotlin/com/mohamedrejeb/richeditor/sample/common/richeditor/RichEditorContent.kt index bbb37cc8..09ff8049 100644 --- a/sample/common/src/commonMain/kotlin/com/mohamedrejeb/richeditor/sample/common/richeditor/RichEditorContent.kt +++ b/sample/common/src/commonMain/kotlin/com/mohamedrejeb/richeditor/sample/common/richeditor/RichEditorContent.kt @@ -178,6 +178,14 @@ fun RichEditorContent() { OutlinedRichTextEditor( modifier = Modifier.fillMaxWidth(), state = outlinedRichTextState, + onRichSpanClick = { span, range, offset -> + println("clicked") + if (span is SpellCheck) { + println("Spell check clicked") + println("Range: $range") + println("Offset: $offset") + } + } ) }