onChangeAsync
Create an extension that launches callback in a coroutine whenever the document changes.
The coroutine scope is tied to the plugin lifecycle and is cancelled when the editor is destroyed. Previous coroutines are NOT cancelled when new changes arrive — use your own Job tracking if you need cancellation.
val session = rememberEditorSession(
extensions = onChangeAsync { text -> saveToServer(text) }
)Content copied to clipboard