Skip to main content

extension-paragraph

package @remirror/extension-paragraph

class ParagraphExtension

The paragraph is one of the essential building blocks for a prosemirror editor and by default it is provided to all editors.

Signature:

export declare class ParagraphExtension extends NodeExtension 

Extends: NodeExtension

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

property name

Signature:

get name(): "paragraph";

method convertParagraph

Convert the current node to a paragraph.

Signature:

convertParagraph(options?: ParagraphCommandOptions): CommandFunction;

Parameters:

ParameterTypeDescription
optionsParagraphCommandOptions(Optional)

Returns:

CommandFunction

method createNodeSpec

Signature:

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

Parameters:

ParameterTypeDescription
extraApplySchemaAttributes
overrideNodeSpecOverride

Returns:

NodeExtensionSpec

method createTags

Signature:

createTags(): ("lastNodeCompatible" | "formattingNode" | "block" | "textBlock")[];

Returns:

("lastNodeCompatible" | "formattingNode" | "block" | "textBlock")[]

method insertParagraph

Inserts a paragraph into the editor at the current selection.

Signature:

insertParagraph(content: string, options?: ParagraphCommandOptions): CommandFunction;

Parameters:

ParameterTypeDescription
contentstring
optionsParagraphCommandOptions(Optional)

Returns:

CommandFunction

method shortcut

Add the paragraph shortcut to the editor. This makes a paragraph into a

Signature:

shortcut(props: KeyBindingProps): boolean;

Parameters:

ParameterTypeDescription
propsKeyBindingProps

Returns:

boolean