hostLayoutAutoSize
Toggle automatic host sizing (ResizeObserver, viewport fill, inner wrapper).
hostLayoutAutoSize
Default: inserts sveditor-host-inner, syncs size with ResizeObserver, and may use viewport-based height (fillFromTop) so the toolbar stays fixed and the body scrolls inside. Set false to mount React on the host element only—no inner wrapper or observers—you must supply height.
Option
| Option | Type | Default | Description |
|---|---|---|---|
hostLayoutAutoSize | boolean | true | Only false turns it off; undefined is treated as on |
SVeditor.create({
el: '#editor',
hostLayoutAutoSize: false,
});When disabled, give the mount node a definite height (e.g. parent flex + min-h-0 + height: 100% / calc).
When enabled (short): host gets sveditor-host; listens to resize / scroll and visualViewport; inline height (numeric) defers to layout; max-height / min-height apply.
Disable when: odd embeds (iframe / Shadow DOM), or you fully control layout.
See EditorOptions.