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:
Parameter | Type | Description |
---|---|---|
options | ParagraphCommandOptions | (Optional) |
Returns:
CommandFunction
method createNodeSpec
Signature:
createNodeSpec(extra: ApplySchemaAttributes, override: NodeSpecOverride): NodeExtensionSpec;
Parameters:
Parameter | Type | Description |
---|---|---|
extra | ApplySchemaAttributes | |
override | NodeSpecOverride |
Returns:
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:
Parameter | Type | Description |
---|---|---|
content | string | |
options | ParagraphCommandOptions | (Optional) |
Returns:
CommandFunction
method shortcut
Add the paragraph shortcut to the editor. This makes a paragraph into a
Signature:
shortcut(props: KeyBindingProps): boolean;
Parameters:
Parameter | Type | Description |
---|---|---|
props | KeyBindingProps |
Returns:
boolean