Skip to content

API reference / @docmentis/udoc-editor / PageInsertsOptions

Interface: PageInsertsOptions ​

Options for the insert-between-pages affordance.

Properties ​

PropertyDescription
i18n?
I18n
The language the insert button's name is in. Default English.
gapPt
number
The inter-page gap in document points — the same value the shell set via setSpacing. The strip's on-screen hover-zone height is this × the frame's scale, so it fills the (page-fixed) gap at every zoom.
composedPageCount
() => number
Total page count (for the after-the-last-page strip).
onInsert
(index) => void
Insert a blank page at index (0 = before the first page).
keepOut?
() => | { left: number; top: number; right: number; bottom: number; } | null
The region (viewport CSS px) the live selection's edit chrome covers, or null when nothing is selected — read every frame. Any insert strip that overlaps it is dropped: a selection near a page edge floats its resize handles and rotation grip into the gap, so yielding the strip there keeps the insert "+" from lighting up under them. Omit to never yield.