extension-font-family
package @remirror/extension-font-family
class FontFamilyExtension
Add a font family to the selected text (or text within a specified range).
Signature:
export declare class FontFamilyExtension extends MarkExtension
Extends: MarkExtension
(Some inherited members may not be shown because they are not represented in the documentation.)
property name
Signature:
get name(): "fontFamily";
method createMarkSpec
Signature:
createMarkSpec(extra: ApplySchemaAttributes, override: MarkSpecOverride): MarkExtensionSpec;
Parameters:
Parameter | Type | Description |
---|---|---|
extra | ApplySchemaAttributes | |
override | MarkSpecOverride |
Returns:
method createTags
Signature:
createTags(): ("formattingMark" | "fontStyle")[];
Returns:
("formattingMark" | "fontStyle")[]
method setFontFamily
Set the font family for the selected text.
Signature:
setFontFamily(fontFamily: string): CommandFunction;
Parameters:
Parameter | Type | Description |
---|---|---|
fontFamily | string |
Returns:
CommandFunction
method toggleFontFamily
Set the font family for the selected text.
Signature:
toggleFontFamily(fontFamily: string): CommandFunction;
Parameters:
Parameter | Type | Description |
---|---|---|
fontFamily | string |
Returns:
CommandFunction
type FontFamilyAttributes
Signature:
export type FontFamilyAttributes = ProsemirrorAttributes<{
fontFamily?: string;
}>;
References: ProsemirrorAttributes