Create an extension that calls callback with the full document text whenever the document changes.
val session = rememberEditorSession( doc = "Hello", extensions = onChange { text -> println("New text: $text") })