EditorContext

An umbrella interface containing all the useful properties and functions of the current editor: Following can be found:

  1. Properties that were provided when calling the Editor composable.

  2. Engine, EditorEventHandler and Activity of the current editor.

  3. CoroutineScope of the current editor.

  4. Collectable EditorState of the editor.

Inheritors

Properties

Link copied to clipboard
abstract val activity: Activity

The activity where the current editor is running.

Link copied to clipboard
abstract val baseUri: Uri

The baseUri provided via param when launching the editor.

Link copied to clipboard
abstract val configuration: StateFlow<EditorConfiguration?>

The configuration of the current editor.

Link copied to clipboard
abstract val coroutineScope: CoroutineScope

The coroutine scope that is always alive while editor is running. It also survives configuration changes.

Link copied to clipboard

The current language code derived from the Activity's configuration (e.g., "en", "de").

Link copied to clipboard
abstract val engine: Engine

The engine of the current editor.

Link copied to clipboard

The event handler of the current editor.

Link copied to clipboard
abstract val host: String

The integration context embedding the engine, used for license matching.

Link copied to clipboard
abstract val license: String?

The license provided via param when launching the editor.

Link copied to clipboard
abstract val state: StateFlow<EditorState>

The state flow of the EditorState.

Link copied to clipboard
abstract val userId: String?

The userId provided via param when launching the editor.

Functions

Link copied to clipboard
abstract fun <T> mutableStateOf(key: String, initial: T): MutableState<T>

MutableState provider for storing custom content in the editor scope. All state values will survive configuration changes and will be available until exiting the editor.

Link copied to clipboard
abstract fun <T> stateOf(key: String): State<T>

State provider to access the state, previously declared via mutableStateOf.