Opens a font picker panel in the editor, prompting the user to select a font. This function is intended for use in the settings panel of a site widget or plugin implemented with a custom element.
Name | Type | Description |
---|---|---|
value | FontPickerValue | Optional. Value of the associated font and text-decoration CSS shorthand properties. |
options | SelectFontOptions | Optional. Options to use when opening the font picker panel. |
Name | Type | Description |
---|---|---|
font | string | Value of the associated font CSS shorthand property, which can include the following:
|
textDecoration | string | Optional. Value of the associated text-decoration CSS shorthand property. Can also be undefined . |
Name | Type | Description |
---|---|---|
onChange | Function | Optional. Callback function invoked when the font selection changes. It receives the updated FontPickerValue as a parameter. |
Promise<FontPickerValue>
The font selected by the user.