Skip to main content

extension-columns

package @remirror/extension-columns

class ColumnsExtension

Add column support to the nodes in your editor.

Signature:

export declare class ColumnsExtension extends NodeExtension<ColumnsOptions> 

Extends: NodeExtension<ColumnsOptions>

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

property name

Signature:

get name(): "columns";

method createNodeSpec

Signature:

createNodeSpec(extra: ApplySchemaAttributes, override: NodeSpecOverride): NodeExtensionSpec;

Parameters:

ParameterTypeDescription
extraApplySchemaAttributes
overrideNodeSpecOverride

Returns:

NodeExtensionSpec

method createSchemaAttributes

Add a column span attribute to all block nodes within the editor.

Signature:

createSchemaAttributes(): IdentifierSchemaAttributes[];

Returns:

IdentifierSchemaAttributes[]

method createTags

Signature:

createTags(): "block"[];

Returns:

"block"[]

method toggleColumns

Toggle a column wrap around the content.

Signature:

toggleColumns(attrs?: ColumnAttributes, options?: ToggleColumnsOptions): CommandFunction;

Parameters:

ParameterTypeDescription
attrsColumnAttributes(Optional)
optionsToggleColumnsOptions(Optional)

Returns:

CommandFunction

variable DEFAULT_COLUMN_ATTRIBUTES

Signature:

DEFAULT_COLUMN_ATTRIBUTES: Required<BaseColumnAttributes>

variable toggleColumnsOptions

Signature:

toggleColumnsOptions: Remirror.CommandDecoratorOptions

interface BaseColumnAttributes

Signature:

export interface BaseColumnAttributes 

property count

Specifies the number of columns an element should be divided into.

Signature:

count?: number;

property fill

Specifies how to fill columns.

Signature:

fill?: 'balance' | 'auto';

property gap

Specifies the gap between the columns.

Signature:

gap?: string;

property ruleColor

Specifies the color of the rule between columns.

Signature:

ruleColor?: string;

property ruleStyle

Specifies the style of the rule between columns.

Signature:

ruleStyle?: 'none' | 'hidden' | 'dotted' | 'dashed' | 'solid' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset';

property ruleWidth

Specifies the width of the rule between columns.

Signature:

ruleWidth?: LiteralUnion<'medium' | 'thin' | 'thick', string>;

property width

Specifies a suggested, optimal width for the columns.

Signature:

width?: string;

interface ColumnsOptions

Signature:

export interface ColumnsOptions 

property defaults

The default columns to use for created columns.

Signature:

defaults?: Static<Required<BaseColumnAttributes>>;

type ColumnAttributes

Signature:

export type ColumnAttributes = ProsemirrorAttributes<BaseColumnAttributes>;

References: ProsemirrorAttributes, BaseColumnAttributes