Skip to main content

Editor Options

Configuration options passed to the <Editor /> component's options prop or the core Editor constructor.

Usage​

<Editor
options={{
margins: [40, 40, 40, 40],
watermark: { data: 'DRAFT', size: 120 },
header: { top: 13 },
footer: { bottom: 0, backgroundColor: '#0c718d' },
pageNumber: {
disabled: false,
format: '{pageNo} of {pageCount}',
size: 10,
},
placeholder: { data: 'Start typing...' },
zone: { tipDisabled: false },
maskMargin: [60, 0, 30, 0],
scrollContainerSelector: '.editor',
}}
/>

Options Reference​

margins​

Page margins in pixels: [top, right, bottom, left].

margins: [40, 40, 40, 40]

watermark​

Text watermark configuration.

PropertyTypeDefaultDescription
datastring''Watermark text (empty = no watermark)
sizenumber120Font size
colorstring—Text color
opacitynumber—Opacity (0-1)

Header zone configuration.

PropertyTypeDefaultDescription
topnumber—Top offset in pixels
disabledbooleanfalseDisable header zone

Footer zone configuration.

PropertyTypeDefaultDescription
bottomnumber—Bottom offset in pixels
disabledbooleanfalseDisable footer zone
backgroundColorstring—Footer background color

pageNumber​

Page number configuration.

PropertyTypeDefaultDescription
disabledbooleanfalseDisable page numbers
formatstring'{pageNo}'Format string. Use {pageNo} and {pageCount}
colorstring—Text color
fontstring—Font family
sizenumber—Font size
rowFlexstring—Alignment: 'left', 'center', 'right'
bottomnumber—Bottom offset

placeholder​

Editor placeholder text.

PropertyTypeDescription
datastringPlaceholder text shown when editor is empty

zone​

Zone (header/body/footer sections) settings.

PropertyTypeDefaultDescription
tipDisabledbooleanfalseDisable zone tip labels

maskMargin​

Margin for the page mask area: [top, right, bottom, left]. Controls the visible area around pages.

maskMargin: [60, 0, 30, 0]

scrollContainerSelector​

CSS selector for the scroll container. Used when the editor is nested inside a custom scroll container.

scrollContainerSelector: '.editor'

defaultBasicRowMarginHeight​

Default spacing between rows in pixels.

defaultBasicRowMarginHeight: 5

Updating Options at Runtime​

Use the command API to update options after initialization:

editor.command.executeUpdateOptions({
watermark: { data: 'CONFIDENTIAL', size: 100 },
})