Variable: fontFamily
ts
const fontFamily: (options) => Extension;Font family as a mark, so one paragraph can mix fonts. Stores { font: id }; renders <span data-font="id" style="font-family: …">. Pasted text keeps a font when its font-family starts with one of yours.
Parameters
| Parameter | Type |
|---|---|
options | FontFamilyOptions |
Returns
Example
ts
fontFamily({
fonts: [
{ id: 'inter', label: 'Inter', css: 'Inter, sans-serif' },
{ id: 'serif', label: 'Serif', css: 'Georgia, serif' },
],
})