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:
Parameter | Type | Description |
---|---|---|
extra | ApplySchemaAttributes | |
override | MarkSpecOverride |
Returns:
method createTags
Signature:
createTags(): ("formattingMark" | "fontStyle")[];
Returns:
("formattingMark" | "fontStyle")[]
method decreaseFontSize
Signature:
decreaseFontSize(options?: SizeCommandOptions): CommandFunction;
Parameters:
Parameter | Type | Description |
---|---|---|
options | SizeCommandOptions | (Optional) |
Returns:
CommandFunction
method decreaseFontSizeShortcut
Handle exiting the mark forwards.
Signature:
decreaseFontSizeShortcut(props: KeyBindingProps): boolean;
Parameters:
Parameter | Type | Description |
---|---|---|
props | KeyBindingProps |
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:
Parameter | Type | Description |
---|---|---|
position | PrimitiveSelection | (Optional) |
Returns:
Helper<Array1<ParsedDomSize>>
method getFontSizeFromDom
Signature:
getFontSizeFromDom(position?: PrimitiveSelection): Helper<ParsedDomSize>;
Parameters:
Parameter | Type | Description |
---|---|---|
position | PrimitiveSelection | (Optional) |
Returns:
Helper<ParsedDomSize>
method increaseFontSize
Signature:
increaseFontSize(options?: SizeCommandOptions): CommandFunction;
Parameters:
Parameter | Type | Description |
---|---|---|
options | SizeCommandOptions | (Optional) |
Returns:
CommandFunction
method increaseFontSizeShortcut
Handle exiting the mark forwards.
Signature:
increaseFontSizeShortcut(props: KeyBindingProps): boolean;
Parameters:
Parameter | Type | Description |
---|---|---|
props | KeyBindingProps |
Returns:
boolean
method removeFontSize
Remove the size mark from the selection.
Signature:
removeFontSize(options?: SizeCommandOptions): CommandFunction;
Parameters:
Parameter | Type | Description |
---|---|---|
options | SizeCommandOptions | (Optional) |
Returns:
CommandFunction
method setFontSize
Set the text size color value for the selected text.
Signature:
setFontSize(size: string | number, options?: SizeCommandOptions): CommandFunction;
Parameters:
Parameter | Type | Description |
---|---|---|
size | string | number | |
options | SizeCommandOptions | (Optional) |
Returns:
CommandFunction