createUniver
TypeScript
import { createUniver } from '@univerjs/presets'const { univer, univerAPI } = createUniver({ presets: [] })Parameters
| Option | Behavior |
|---|---|
presets | Array of preset results. Each preset contributes plugins and their configuration. |
plugins | Additional plugin constructors or [Plugin, config] tuples. A duplicate plugin name already supplied by a preset or another additional plugin throws an error. |
collaboration | Set to true to remove the default local undo/redo, authorization IO, and mention IO services. Install the collaboration integration that supplies their replacements. |
override | Dependency overrides applied to the Univer instance. |
| Other options | Forwarded to IUniverConfig. createUniver() defaults logLevel to LogLevel.WARN. |
When multiple presets contain the same plugin, the last preset’s plugin configuration replaces the earlier one; configurations are not deep-merged. Although the type accepts [preset, { lazy: true }], the current implementation does not use lazy to defer registration. IPreset.locales is not loaded automatically; register language packs through the top-level locales option.
Returns
| Property | Type | Purpose |
|---|---|---|
univer | Univer | Runtime instance; call dispose() on cleanup. |
univerAPI | FUniver | Facade entry for the registered plugins. |
The function returns synchronously. Business units are created separately through univerAPI.
How is this guide?