Skip to main content

extension-node-formatting

package @remirror/extension-node-formatting

class NodeFormattingExtension​

Support consistent formatting of nodes within your editor.

Signature:

export declare class NodeFormattingExtension extends PlainExtension<NodeFormattingOptions> 

Extends: PlainExtension<NodeFormattingOptions>

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

property name​

Signature:

get name(): "nodeFormatting";

method centerAlign​

Center the text within current block node.

Signature:

centerAlign(): CommandFunction;

Returns:

CommandFunction

method centerAlignShortcut​

Signature:

centerAlignShortcut(props: KeyBindingProps): boolean;

Parameters:

ParameterTypeDescription
propsKeyBindingProps

Returns:

boolean

method createSchemaAttributes​

Set up the extra attributes which are applied to the formattable node blocks.

Signature:

createSchemaAttributes(): IdentifierSchemaAttributes[];

Returns:

IdentifierSchemaAttributes[]

method decreaseIndent​

Decrease the indentation of the current block node.

Signature:

decreaseIndent(): CommandFunction;

Returns:

CommandFunction

method decreaseIndentShortcut​

Signature:

decreaseIndentShortcut(props: KeyBindingProps): boolean;

Parameters:

ParameterTypeDescription
propsKeyBindingProps

Returns:

boolean

method increaseIndent​

Increase the indentation level of the current block node, if applicable.

Signature:

increaseIndent(): CommandFunction;

Returns:

CommandFunction

method increaseIndentShortcut​

Signature:

increaseIndentShortcut(props: KeyBindingProps): boolean;

Parameters:

ParameterTypeDescription
propsKeyBindingProps

Returns:

boolean

method justifyAlign​

Justify the text within the current block node.

Signature:

justifyAlign(): CommandFunction;

Returns:

CommandFunction

method justifyAlignShortcut​

Signature:

justifyAlignShortcut(props: KeyBindingProps): boolean;

Parameters:

ParameterTypeDescription
propsKeyBindingProps

Returns:

boolean

method leftAlign​

Left align the text within the current block node.

Signature:

leftAlign(): CommandFunction;

Returns:

CommandFunction

method leftAlignShortcut​

Signature:

leftAlignShortcut(props: KeyBindingProps): boolean;

Parameters:

ParameterTypeDescription
propsKeyBindingProps

Returns:

boolean

method rightAlign​

Right align the text within the current block node.

Signature:

rightAlign(): CommandFunction;

Returns:

CommandFunction

method rightAlignShortcut​

Signature:

rightAlignShortcut(props: KeyBindingProps): boolean;

Parameters:

ParameterTypeDescription
propsKeyBindingProps

Returns:

boolean

method setIndent​

Set the indent level for the selected nodes.

Signature:

setIndent(level: number | '+1' | '-1'): CommandFunction;

Parameters:

ParameterTypeDescription
levelnumber | '+1' | '-1'

Returns:

CommandFunction

method setLineHeight​

Signature:

setLineHeight(lineHeight: number): CommandFunction;

Parameters:

ParameterTypeDescription
lineHeightnumber

Returns:

CommandFunction

method setTextAlignment​

Set the text alignment for the selected nodes.

Signature:

setTextAlignment(alignment: NodeTextAlignment): CommandFunction;

Parameters:

ParameterTypeDescription
alignmentNodeTextAlignment

Returns:

CommandFunction