Skip to main content

extension-font-size

package @remirror/extension-font-size

class FontSizeExtension

Add a font size to the selected text (or text within a specified range).

Signature:

export declare class FontSizeExtension extends MarkExtension<FontSizeOptions> 

Extends: MarkExtension<FontSizeOptions>

(Some inherited members may not be shown because they are not represented in the documentation.)

property name

Signature:

get name(): "fontSize";

method createMarkSpec

Signature:

createMarkSpec(extra: ApplySchemaAttributes, override: MarkSpecOverride): MarkExtensionSpec;

Parameters:

ParameterTypeDescription
extraApplySchemaAttributes
overrideMarkSpecOverride

Returns:

MarkExtensionSpec

method createTags

Signature:

createTags(): ("formattingMark" | "fontStyle")[];

Returns:

("formattingMark" | "fontStyle")[]

method decreaseFontSize

Signature:

decreaseFontSize(options?: SizeCommandOptions): CommandFunction;

Parameters:

ParameterTypeDescription
optionsSizeCommandOptions(Optional)

Returns:

CommandFunction

method decreaseFontSizeShortcut

Handle exiting the mark forwards.

Signature:

decreaseFontSizeShortcut(props: KeyBindingProps): boolean;

Parameters:

ParameterTypeDescription
propsKeyBindingProps

Returns:

boolean

method getFontSizeForSelection

Get the font size at the current selection (or provided custom selection). Returns an array of parsed font size tuples if there are multiple sizes in the non-empty selection.

Signature:

getFontSizeForSelection(position?: PrimitiveSelection): Helper<Array1<ParsedDomSize>>;

Parameters:

ParameterTypeDescription
positionPrimitiveSelection(Optional)

Returns:

Helper<Array1<ParsedDomSize>>

method getFontSizeFromDom

Signature:

getFontSizeFromDom(position?: PrimitiveSelection): Helper<ParsedDomSize>;

Parameters:

ParameterTypeDescription
positionPrimitiveSelection(Optional)

Returns:

Helper<ParsedDomSize>

method increaseFontSize

Signature:

increaseFontSize(options?: SizeCommandOptions): CommandFunction;

Parameters:

ParameterTypeDescription
optionsSizeCommandOptions(Optional)

Returns:

CommandFunction

method increaseFontSizeShortcut

Handle exiting the mark forwards.

Signature:

increaseFontSizeShortcut(props: KeyBindingProps): boolean;

Parameters:

ParameterTypeDescription
propsKeyBindingProps

Returns:

boolean

method removeFontSize

Remove the size mark from the selection.

Signature:

removeFontSize(options?: SizeCommandOptions): CommandFunction;

Parameters:

ParameterTypeDescription
optionsSizeCommandOptions(Optional)

Returns:

CommandFunction

method setFontSize

Set the text size color value for the selected text.

Signature:

setFontSize(size: string | number, options?: SizeCommandOptions): CommandFunction;

Parameters:

ParameterTypeDescription
sizestring | number
optionsSizeCommandOptions(Optional)

Returns:

CommandFunction