rememberSaveableEditorSession
fun rememberSaveableEditorSession(doc: String = "", extensions: Extension? = null, fields: Map<String, StateField<*>>? = null, onUpdate: (Transaction) -> Unit = {}): EditorSession
Create and remember an EditorSession that survives configuration changes and process death via rememberSaveable.
On first composition, creates a new session with doc and extensions. On restoration, the document text and selection are preserved.
Parameters
doc
Initial document text (only used on first creation).
extensions
Extensions for the editor.
fields
Map of name → StateField for custom fields to persist.
onUpdate
Optional callback invoked after each transaction.