Skip to content

Commit

Permalink
Merge branch 'textchangeflow' into spell-check-test
Browse files Browse the repository at this point in the history
# Conflicts:
#	richeditor-compose/api/android/richeditor-compose.api
#	richeditor-compose/api/desktop/richeditor-compose.api
#	sample/common/src/commonMain/kotlin/com/mohamedrejeb/richeditor/sample/common/richeditor/RichEditorContent.kt
  • Loading branch information
Wavesonics committed Nov 29, 2024
2 parents 47a9c60 + ad23f9d commit 8bf8154
Showing 1 changed file with 3 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,8 @@ import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.unit.DpOffset
Expand All @@ -44,7 +29,7 @@ import com.mohamedrejeb.richeditor.ui.InteractionType
import com.mohamedrejeb.richeditor.ui.material3.OutlinedRichTextEditor
import com.mohamedrejeb.richeditor.ui.material3.RichText
import com.mohamedrejeb.richeditor.ui.material3.RichTextEditor
import kotlinx.coroutines.launch
import kotlinx.coroutines.*

@OptIn(ExperimentalMaterial3Api::class)
@Composable
Expand All @@ -58,12 +43,10 @@ fun RichEditorContent() {

LaunchedEffect(Unit) {
scope.launch {
println("Start collecting...")
outlinedRichTextState.textChanges.collect { state ->
println("Text changed!")
println(state.toText())
}
println("Collection finished!")
}
}

Expand Down

0 comments on commit 8bf8154

Please sign in to comment.