Skip to main content

extension-italic

package @remirror/extension-italic

class ItalicExtension

Add italic formatting to your editor.

Signature:

export declare class ItalicExtension extends MarkExtension 

Extends: MarkExtension

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

property name

Signature:

get name(): "italic";

method createInputRules

Signature:

createInputRules(): InputRule[];

Returns:

InputRule[]

method createKeymap

Signature:

createKeymap(): KeyBindings;

Returns:

KeyBindings

method createMarkSpec

Signature:

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

Parameters:

ParameterTypeDescription
extraApplySchemaAttributes
overrideMarkSpecOverride

Returns:

MarkExtensionSpec

method createPasteRules

Signature:

createPasteRules(): MarkPasteRule[];

Returns:

MarkPasteRule[]

method createTags

Signature:

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

Returns:

("formattingMark" | "fontStyle")[]

method shortcut

Attach the keyboard shortcut for formatting.

Signature:

shortcut(props: KeyBindingProps): boolean;

Parameters:

ParameterTypeDescription
propsKeyBindingProps

Returns:

boolean

method toggleItalic

Toggle the italic formatting on the selected text.

Signature:

toggleItalic(selection?: PrimitiveSelection): CommandFunction;

Parameters:

ParameterTypeDescription
selectionPrimitiveSelection(Optional)

Returns:

CommandFunction