Skip to main content

extension-underline

package @remirror/extension-underline

class UnderlineExtension

Add underline formatting support to the editor.

Signature:

export declare class UnderlineExtension extends MarkExtension 

Extends: MarkExtension

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

property name

Signature:

get name(): "underline";

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 shortcut

Attach the keyboard shortcut for formatting the text.

Signature:

shortcut(props: KeyBindingProps): boolean;

Parameters:

ParameterTypeDescription
propsKeyBindingProps

Returns:

boolean

method toggleUnderline

Toggle the underline formatting of the selected text.

This command is provided by the UnderlineExtension.

Signature:

toggleUnderline(selection?: PrimitiveSelection): CommandFunction;

Parameters:

ParameterTypeDescription
selectionPrimitiveSelection(Optional)

Returns:

CommandFunction