rememberMaterialEditorTheme

Create an EditorTheme that automatically derives its colors from the current MaterialTheme.colorScheme.

The theme updates whenever the Material color scheme changes (e.g., when switching between light and dark mode).

MaterialTheme(colorScheme = dynamicColorScheme) {
val theme = rememberMaterialEditorTheme()
val session = rememberEditorSession(
doc = "Hello",
extensions = basicSetup + theme
)
KodeMirror(session)
}