Skip to main content

Custom Footer

The footer (status bar) at the bottom of the editor shows page info, zoom controls, and paper settings. Like the toolbar, every footer component is individually exported.

import {
Editor,
FooterStatus,
PageScaleMinusTool, PageScalePercentageTool, PageScaleAddTool,
PaperSizeTool, PaperDirectionTool,
FullscreenTool,
} from '@windoc/react'

function MyFooter() {
return (
<div style={{ display: 'flex', justifyContent: 'space-between', padding: '4px 12px', borderTop: '1px solid #e5e7eb' }}>
<FooterStatus />
<div style={{ display: 'flex', gap: 4 }}>
<PageScaleMinusTool />
<PageScalePercentageTool />
<PageScaleAddTool />
<PaperSizeTool />
<PaperDirectionTool />
<FullscreenTool />
</div>
</div>
)
}

export default function App() {
return (
<Editor footer={false} renderFooter={<MyFooter />} />
)
}
ComponentDescription
CatalogToggleToolToggle document outline
PageModeToolSwitch page display mode
FooterStatusPage/word count status display
EditorModeToolSwitch editor mode (edit/readonly)
PageScaleMinusToolZoom out
PageScalePercentageToolCurrent zoom percentage
PageScaleAddToolZoom in
PaperSizeToolPaper size selector (A4, Letter, etc.)
PaperDirectionToolPaper orientation (portrait/landscape)
PaperMarginToolPaper margin settings
FullscreenToolToggle fullscreen mode
EditorOptionToolEditor options panel
WatermarkFooterToolWatermark toggle

Using the useFooter Hook

Build completely custom status displays:

import { useFooter } from '@windoc/react'

function MyStatus() {
const { pageNo, pageSize, wordCount, pageScale } = useFooter()

return (
<span>
Page {pageNo}/{pageSize} | {wordCount} words | {pageScale}%
</span>
)
}