New

docx-editor 1.x has shipped. Vue support, i18n, agents. Read the migration guide →

API Referencev1.0.2

@eigenpal/docx-editor-core/utils/fontOptions

Shared FontOption shape + normaliser used by FontPicker components in both adapters. Lifted from packages/react/src/components/ui/ normalizeFontFamilies.ts so the type definition has a single home.

Functions(1)

Normalize a `fontFamilies` prop (mix of strings and FontOption objects) into a uniform `FontOption[]`. Returns `undefined` for `undefined` input so callers fall back to their built-in defaults. Strings expand into the `'other'` group with no CSS fallback chain.

declare function normalizeFontFamilies(fontFamilies: ReadonlyArray<string | FontOption> | undefined): FontOption[] | undefined;

Interfaces(1)

Shared FontOption shape + normaliser used by FontPicker components in both adapters. Lifted from packages/react/src/components/ui/ normalizeFontFamilies.ts so the type definition has a single home.

interface FontOption
MemberTypeSummary
category?'sans-serif' | 'serif' | 'monospace' | 'other'
fontFamilystring
namestring