@umbraco-cms/backoffice
    Preparing search index...

    Interface NodeConfig<Options, Storage>

    interface NodeConfig<Options = any, Storage = any> {
        addAttributes?: (
            this: {
                editor?: Editor;
                name: string;
                options: Options;
                parent: undefined | ((...args: []) => {} | Attributes);
                storage: Storage;
            },
        ) => {}
        | Attributes;
        addCommands?: (
            this: {
                editor: Editor;
                name: string;
                options: Options;
                parent: undefined | ((...args: []) => ReturnType<Required<T>[P]>);
                storage: Storage;
                type: NodeType;
            },
        ) => Partial<RawCommands>;
        addExtensions?: (
            this: {
                name: string;
                options: Options;
                parent: undefined | ((...args: []) => Extensions);
                storage: Storage;
            },
        ) => Extensions;
        addGlobalAttributes?: (
            this: {
                extensions: (Mark<any, any> | Node<any, any>)[];
                name: string;
                options: Options;
                parent: undefined | ((...args: []) => GlobalAttributes);
                storage: Storage;
            },
        ) => GlobalAttributes;
        addInputRules?: (
            this: {
                editor: Editor;
                name: string;
                options: Options;
                parent: undefined | ((...args: []) => InputRule[]);
                storage: Storage;
                type: NodeType;
            },
        ) => InputRule[];
        addKeyboardShortcuts?: (
            this: {
                editor: Editor;
                name: string;
                options: Options;
                parent:
                    | undefined
                    | ((...args: []) => { [key: string]: KeyboardShortcutCommand });
                storage: Storage;
                type: NodeType;
            },
        ) => { [key: string]: KeyboardShortcutCommand };
        addNodeView?:
            | null
            | (
                (
                    this: {
                        editor: Editor;
                        name: string;
                        options: Options;
                        parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: NodeType; parent: ... | null | undefined; }) => NodeViewRenderer) | null | undefined;
                        storage: Storage;
                        type: NodeType;
                    },
                ) => NodeViewRenderer
            );
        addOptions?: (
            this: { name: string; parent: undefined | ((...args: []) => Options) },
        ) => Options;
        addPasteRules?: (
            this: {
                editor: Editor;
                name: string;
                options: Options;
                parent: undefined | ((...args: []) => PasteRule[]);
                storage: Storage;
                type: NodeType;
            },
        ) => PasteRule[];
        addProseMirrorPlugins?: (
            this: {
                editor: Editor;
                name: string;
                options: Options;
                parent: undefined | ((...args: []) => Plugin<any>[]);
                storage: Storage;
                type: NodeType;
            },
        ) => Plugin<any>[];
        addStorage?: (
            this: {
                name: string;
                options: Options;
                parent: undefined | ((...args: []) => Storage);
            },
        ) => Storage;
        allowGapCursor?: | null
        | boolean
        | (
            (
                this: {
                    name: string;
                    options: Options;
                    parent:
                        | undefined
                        | null
                        | boolean
                        | (
                            (
                                this: {
                                    name: string;
                                    options: Options;
                                    parent: boolean | ((this: { name: string; options: Options; storage: any; parent: boolean | ... | null | undefined; }) => boolean | null) | null | undefined;
                                    storage: any;
                                },
                            ) => null
                            | boolean
                        );
                    storage: Storage;
                },
            ) => null
            | boolean
        );
        atom?:
            | boolean
            | (
                (
                    this: {
                        editor?: Editor;
                        name: string;
                        options: Options;
                        parent: boolean | ((this: { name: string; options: Options; storage: Storage; parent: boolean | ... | undefined; editor?: Editor | undefined; }) => boolean | undefined) | undefined;
                        storage: Storage;
                    },
                ) => undefined
                | boolean
            );
        code?:
            | boolean
            | (
                (
                    this: {
                        editor?: Editor;
                        name: string;
                        options: Options;
                        parent: boolean | ((this: { name: string; options: Options; storage: Storage; parent: boolean | ... | undefined; editor?: Editor | undefined; }) => boolean | undefined) | undefined;
                        storage: Storage;
                    },
                ) => undefined
                | boolean
            );
        content?:
            | string
            | (
                (
                    this: {
                        editor?: Editor;
                        name: string;
                        options: Options;
                        parent: string | ((this: { name: string; options: Options; storage: Storage; parent: string | ... | undefined; editor?: Editor | undefined; }) => string | undefined) | undefined;
                        storage: Storage;
                    },
                ) => undefined
                | string
            );
        defining?:
            | boolean
            | (
                (
                    this: {
                        editor?: Editor;
                        name: string;
                        options: Options;
                        parent: boolean | ((this: { name: string; options: Options; storage: Storage; parent: boolean | ... | undefined; editor?: Editor | undefined; }) => boolean | undefined) | undefined;
                        storage: Storage;
                    },
                ) => undefined
                | boolean
            );
        draggable?:
            | boolean
            | (
                (
                    this: {
                        editor?: Editor;
                        name: string;
                        options: Options;
                        parent: boolean | ((this: { name: string; options: Options; storage: Storage; parent: boolean | ... | undefined; editor?: Editor | undefined; }) => boolean | undefined) | undefined;
                        storage: Storage;
                    },
                ) => undefined
                | boolean
            );
        extendMarkSchema?:
            | null
            | (
                (
                    this: {
                        name: string;
                        options: Options;
                        parent: ((this: { name: string; options: Options; storage: Storage; parent: ... | null | undefined; }, extension: Mark<any, any>) => Record<string, any>) | null | undefined;
                        storage: Storage;
                    },
                    extension: Mark,
                ) => Record<string, any>
            );
        extendNodeSchema?:
            | null
            | (
                (
                    this: {
                        name: string;
                        options: Options;
                        parent: ((this: { name: string; options: Options; storage: Storage; parent: ... | null | undefined; }, extension: Node<any, any>) => Record<string, any>) | null | undefined;
                        storage: Storage;
                    },
                    extension: Node,
                ) => Record<string, any>
            );
        group?:
            | string
            | (
                (
                    this: {
                        editor?: Editor;
                        name: string;
                        options: Options;
                        parent: string | ((this: { name: string; options: Options; storage: Storage; parent: string | ... | undefined; editor?: Editor | undefined; }) => string | undefined) | undefined;
                        storage: Storage;
                    },
                ) => undefined
                | string
            );
        inline?:
            | boolean
            | (
                (
                    this: {
                        editor?: Editor;
                        name: string;
                        options: Options;
                        parent: boolean | ((this: { name: string; options: Options; storage: Storage; parent: boolean | ... | undefined; editor?: Editor | undefined; }) => boolean | undefined) | undefined;
                        storage: Storage;
                    },
                ) => undefined
                | boolean
            );
        isolating?:
            | boolean
            | (
                (
                    this: {
                        editor?: Editor;
                        name: string;
                        options: Options;
                        parent: boolean | ((this: { name: string; options: Options; storage: Storage; parent: boolean | ... | undefined; editor?: Editor | undefined; }) => boolean | undefined) | undefined;
                        storage: Storage;
                    },
                ) => undefined
                | boolean
            );
        linebreakReplacement?:
            | boolean
            | (
                (
                    this: {
                        editor?: Editor;
                        name: string;
                        options: Options;
                        parent: boolean | ((this: { name: string; options: Options; storage: Storage; parent: boolean | ... | undefined; editor?: Editor | undefined; }) => boolean | undefined) | undefined;
                        storage: Storage;
                    },
                ) => undefined
                | boolean
            );
        marks?:
            | string
            | (
                (
                    this: {
                        editor?: Editor;
                        name: string;
                        options: Options;
                        parent: string | ((this: { name: string; options: Options; storage: Storage; parent: string | ... | undefined; editor?: Editor | undefined; }) => string | undefined) | undefined;
                        storage: Storage;
                    },
                ) => undefined
                | string
            );
        name: string;
        onBeforeCreate?:
            | null
            | (
                (
                    this: {
                        editor: Editor;
                        name: string;
                        options: Options;
                        parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: NodeType; parent: ... | null | undefined; }, event: { editor: Editor; }) => void) | null | undefined;
                        storage: Storage;
                        type: NodeType;
                    },
                    event: { editor: Editor },
                ) => void
            );
        onBlur?:
            | null
            | (
                (
                    this: {
                        editor: Editor;
                        name: string;
                        options: Options;
                        parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: NodeType; parent: ... | ... 1 more ... | undefined; }, event: { editor: Editor; event: FocusEvent; transaction: Transaction; }) => void) | null | undefined;
                        storage: Storage;
                        type: NodeType;
                    },
                    event: { editor: Editor; event: FocusEvent; transaction: Transaction },
                ) => void
            );
        onCreate?:
            | null
            | (
                (
                    this: {
                        editor: Editor;
                        name: string;
                        options: Options;
                        parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: NodeType; parent: ... | null | undefined; }, event: { editor: Editor; }) => void) | null | undefined;
                        storage: Storage;
                        type: NodeType;
                    },
                    event: { editor: Editor },
                ) => void
            );
        onDestroy?:
            | null
            | (
                (
                    this: {
                        editor: Editor;
                        name: string;
                        options: Options;
                        parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: NodeType; parent: ... | null | undefined; }, event: void) => void) | null | undefined;
                        storage: Storage;
                        type: NodeType;
                    },
                    event: void,
                ) => void
            );
        onFocus?:
            | null
            | (
                (
                    this: {
                        editor: Editor;
                        name: string;
                        options: Options;
                        parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: NodeType; parent: ... | ... 1 more ... | undefined; }, event: { editor: Editor; event: FocusEvent; transaction: Transaction; }) => void) | null | undefined;
                        storage: Storage;
                        type: NodeType;
                    },
                    event: { editor: Editor; event: FocusEvent; transaction: Transaction },
                ) => void
            );
        onSelectionUpdate?:
            | null
            | (
                (
                    this: {
                        editor: Editor;
                        name: string;
                        options: Options;
                        parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: NodeType; parent: ... | ... 1 more ... | undefined; }, event: { editor: Editor; transaction: Transaction; }) => void) | null | undefined;
                        storage: Storage;
                        type: NodeType;
                    },
                    event: { editor: Editor; transaction: Transaction },
                ) => void
            );
        onTransaction?:
            | null
            | (
                (
                    this: {
                        editor: Editor;
                        name: string;
                        options: Options;
                        parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: NodeType; parent: ... | ... 1 more ... | undefined; }, event: { editor: Editor; transaction: Transaction; appendedTransactions: Transaction[]; }) => void) | null | undefined;
                        storage: Storage;
                        type: NodeType;
                    },
                    event: {
                        appendedTransactions: Transaction[];
                        editor: Editor;
                        transaction: Transaction;
                    },
                ) => void
            );
        onUpdate?: | null
        | (
            (
                this: {
                    editor: Editor;
                    name: string;
                    options: Options;
                    parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: NodeType; parent: ... | ... 1 more ... | undefined; }, event: { editor: Editor; transaction: Transaction; appendedTransactions: Transaction[]; }) => void) | null | undefined;
                    storage: Storage;
                    type: NodeType;
                },
                event: {
                    appendedTransactions: Transaction[];
                    editor: Editor;
                    transaction: Transaction;
                },
            ) => void
        );
        parseHTML?: (
            this: {
                editor?: Editor;
                name: string;
                options: Options;
                parent:
                    | undefined
                    | ((...args: []) => undefined | readonly TagParseRule[]);
                storage: Storage;
            },
        ) => undefined
        | readonly TagParseRule[];
        priority?: number;
        renderHTML?:
            | null
            | (
                (
                    this: {
                        editor?: Editor;
                        name: string;
                        options: Options;
                        parent: ((this: { name: string; options: Options; storage: Storage; parent: ... | null | undefined; editor?: Editor | undefined; }, props: { node: Node; HTMLAttributes: Record<string, any>; }) => DOMOutputSpec) | null | undefined;
                        storage: Storage;
                    },
                    props: { HTMLAttributes: Record<string, any>; node: Node },
                ) => DOMOutputSpec
            );
        renderText?:
            | null
            | (
                (
                    this: {
                        editor?: Editor;
                        name: string;
                        options: Options;
                        parent: ((this: { name: string; options: Options; storage: Storage; parent: ... | null | undefined; editor?: Editor | undefined; }, props: { node: Node; pos: number; parent: Node; index: number; }) => string) | null | undefined;
                        storage: Storage;
                    },
                    props: { index: number; node: Node; parent: Node; pos: number },
                ) => string
            );
        selectable?:
            | boolean
            | (
                (
                    this: {
                        editor?: Editor;
                        name: string;
                        options: Options;
                        parent: boolean | ((this: { name: string; options: Options; storage: Storage; parent: boolean | ... | undefined; editor?: Editor | undefined; }) => boolean | undefined) | undefined;
                        storage: Storage;
                    },
                ) => undefined
                | boolean
            );
        tableRole?:
            | string
            | (
                (
                    this: {
                        name: string;
                        options: Options;
                        parent:
                            | undefined
                            | string
                            | (
                                (
                                    this: {
                                        name: string;
                                        options: Options;
                                        parent: string | ((this: { name: string; options: Options; storage: any; parent: string | ... | undefined; }) => string) | undefined;
                                        storage: any;
                                    },
                                ) => string
                            );
                        storage: Storage;
                    },
                ) => string
            );
        topNode?: boolean;
        whitespace?: | "pre"
        | "normal"
        | (
            (
                this: {
                    editor?: Editor;
                    name: string;
                    options: Options;
                    parent: "pre" | "normal" | ((this: { name: string; options: Options; storage: Storage; parent: "pre" | "normal" | ... | undefined; editor?: Editor | undefined; }) => "pre" | ... 1 more ... | undefined) | undefined;
                    storage: Storage;
                },
            ) => undefined
            | "pre"
            | "normal"
        );
    }

    Type Parameters

    • Options = any
    • Storage = any

    Hierarchy

    • ExtendableConfig<Options, Storage, NodeConfig<Options, Storage>, NodeType$1>
      • NodeConfig
    Index

    Properties

    addAttributes?: (
        this: {
            editor?: Editor;
            name: string;
            options: Options;
            parent: undefined | ((...args: []) => {} | Attributes);
            storage: Storage;
        },
    ) => {}
    | Attributes

    Add attributes to the node

    addAttributes: () => ({ class: 'foo' })
    
    addCommands?: (
        this: {
            editor: Editor;
            name: string;
            options: Options;
            parent: undefined | ((...args: []) => ReturnType<Required<T>[P]>);
            storage: Storage;
            type: NodeType;
        },
    ) => Partial<RawCommands>

    This function adds commands to the editor

    addCommands() {
    return {
    myCommand: () => ({ chain }) => chain().setMark('type', 'foo').run(),
    }
    }
    addExtensions?: (
        this: {
            name: string;
            options: Options;
            parent: undefined | ((...args: []) => Extensions);
            storage: Storage;
        },
    ) => Extensions

    This function adds additional extensions to the editor. This is useful for building extension kits.

    addExtensions() {
    return [
    BulletList,
    OrderedList,
    ListItem
    ]
    }
    addGlobalAttributes?: (
        this: {
            extensions: (Mark<any, any> | Node<any, any>)[];
            name: string;
            options: Options;
            parent: undefined | ((...args: []) => GlobalAttributes);
            storage: Storage;
        },
    ) => GlobalAttributes

    This function adds globalAttributes to specific nodes.

    addGlobalAttributes() {
    return [
    {
    // Extend the following extensions
    types: [
    'heading',
    'paragraph',
    ],
    // … with those attributes
    attributes: {
    textAlign: {
    default: 'left',
    renderHTML: attributes => ({
    style: `text-align: ${attributes.textAlign}`,
    }),
    parseHTML: element => element.style.textAlign || 'left',
    },
    },
    },
    ]
    }
    addInputRules?: (
        this: {
            editor: Editor;
            name: string;
            options: Options;
            parent: undefined | ((...args: []) => InputRule[]);
            storage: Storage;
            type: NodeType;
        },
    ) => InputRule[]

    This function adds input rules to the editor.

    addInputRules() {
    return [
    markInputRule({
    find: inputRegex,
    type: this.type,
    }),
    ]
    },
    addKeyboardShortcuts?: (
        this: {
            editor: Editor;
            name: string;
            options: Options;
            parent:
                | undefined
                | ((...args: []) => { [key: string]: KeyboardShortcutCommand });
            storage: Storage;
            type: NodeType;
        },
    ) => { [key: string]: KeyboardShortcutCommand }

    This function registers keyboard shortcuts.

    addKeyboardShortcuts() {
    return {
    'Mod-l': () => this.editor.commands.toggleBulletList(),
    }
    },
    addNodeView?:
        | null
        | (
            (
                this: {
                    editor: Editor;
                    name: string;
                    options: Options;
                    parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: NodeType; parent: ... | null | undefined; }) => NodeViewRenderer) | null | undefined;
                    storage: Storage;
                    type: NodeType;
                },
            ) => NodeViewRenderer
        )

    Node View

    addOptions?: (
        this: { name: string; parent: undefined | ((...args: []) => Options) },
    ) => Options

    This method will add options to this extension

    addOptions() {
    return {
    myOption: 'foo',
    myOtherOption: 10,
    }
    addPasteRules?: (
        this: {
            editor: Editor;
            name: string;
            options: Options;
            parent: undefined | ((...args: []) => PasteRule[]);
            storage: Storage;
            type: NodeType;
        },
    ) => PasteRule[]

    This function adds paste rules to the editor.

    addPasteRules() {
    return [
    markPasteRule({
    find: pasteRegex,
    type: this.type,
    }),
    ]
    },
    addProseMirrorPlugins?: (
        this: {
            editor: Editor;
            name: string;
            options: Options;
            parent: undefined | ((...args: []) => Plugin<any>[]);
            storage: Storage;
            type: NodeType;
        },
    ) => Plugin<any>[]

    This function adds Prosemirror plugins to the editor

    addProseMirrorPlugins() {
    return [
    customPlugin(),
    ]
    }
    addStorage?: (
        this: {
            name: string;
            options: Options;
            parent: undefined | ((...args: []) => Storage);
        },
    ) => Storage

    The default storage this extension can save data to.

    defaultStorage: {
    prefetchedUsers: [],
    loading: false,
    }
    allowGapCursor?:
        | null
        | boolean
        | (
            (
                this: {
                    name: string;
                    options: Options;
                    parent:
                        | undefined
                        | null
                        | boolean
                        | (
                            (
                                this: {
                                    name: string;
                                    options: Options;
                                    parent: boolean | ((this: { name: string; options: Options; storage: any; parent: boolean | ... | null | undefined; }) => boolean | null) | null | undefined;
                                    storage: any;
                                },
                            ) => null
                            | boolean
                        );
                    storage: Storage;
                },
            ) => null
            | boolean
        )

    A function to determine whether the gap cursor is allowed at the current position. Must return true or false.

    null
    
    atom?:
        | boolean
        | (
            (
                this: {
                    editor?: Editor;
                    name: string;
                    options: Options;
                    parent: boolean | ((this: { name: string; options: Options; storage: Storage; parent: boolean | ... | undefined; editor?: Editor | undefined; }) => boolean | undefined) | undefined;
                    storage: Storage;
                },
            ) => undefined
            | boolean
        )

    Can be set to true to indicate that, though this isn't a leaf node, it doesn't have directly editable content and should be treated as a single unit in the view.

    atom: true
    
    code?:
        | boolean
        | (
            (
                this: {
                    editor?: Editor;
                    name: string;
                    options: Options;
                    parent: boolean | ((this: { name: string; options: Options; storage: Storage; parent: boolean | ... | undefined; editor?: Editor | undefined; }) => boolean | undefined) | undefined;
                    storage: Storage;
                },
            ) => undefined
            | boolean
        )

    Can be used to indicate that this node contains code, which causes some commands to behave differently.

    content?:
        | string
        | (
            (
                this: {
                    editor?: Editor;
                    name: string;
                    options: Options;
                    parent: string | ((this: { name: string; options: Options; storage: Storage; parent: string | ... | undefined; editor?: Editor | undefined; }) => string | undefined) | undefined;
                    storage: Storage;
                },
            ) => undefined
            | string
        )

    The content expression for this node, as described in the schema guide. When not given, the node does not allow any content.

    You can read more about it on the Prosemirror documentation here

    undefined
    
    content: 'block+'
    
    content: 'headline paragraph block*'
    
    defining?:
        | boolean
        | (
            (
                this: {
                    editor?: Editor;
                    name: string;
                    options: Options;
                    parent: boolean | ((this: { name: string; options: Options; storage: Storage; parent: boolean | ... | undefined; editor?: Editor | undefined; }) => boolean | undefined) | undefined;
                    storage: Storage;
                },
            ) => undefined
            | boolean
        )

    When enabled, enables both definingAsContext and definingForContent.

    false
    
    isolating: true
    
    draggable?:
        | boolean
        | (
            (
                this: {
                    editor?: Editor;
                    name: string;
                    options: Options;
                    parent: boolean | ((this: { name: string; options: Options; storage: Storage; parent: boolean | ... | undefined; editor?: Editor | undefined; }) => boolean | undefined) | undefined;
                    storage: Storage;
                },
            ) => undefined
            | boolean
        )

    Determines whether nodes of this type can be dragged without being selected. Defaults to false.

    @default: false @example: draggable: true

    extendMarkSchema?:
        | null
        | (
            (
                this: {
                    name: string;
                    options: Options;
                    parent: ((this: { name: string; options: Options; storage: Storage; parent: ... | null | undefined; }, extension: Mark<any, any>) => Record<string, any>) | null | undefined;
                    storage: Storage;
                },
                extension: Mark,
            ) => Record<string, any>
        )

    This function extends the schema of the mark.

    extendMarkSchema() {
    return {
    group: 'inline',
    selectable: false,
    }
    }
    extendNodeSchema?:
        | null
        | (
            (
                this: {
                    name: string;
                    options: Options;
                    parent: ((this: { name: string; options: Options; storage: Storage; parent: ... | null | undefined; }, extension: Node<any, any>) => Record<string, any>) | null | undefined;
                    storage: Storage;
                },
                extension: Node,
            ) => Record<string, any>
        )

    This function extends the schema of the node.

    extendNodeSchema() {
    return {
    group: 'inline',
    selectable: false,
    }
    }
    group?:
        | string
        | (
            (
                this: {
                    editor?: Editor;
                    name: string;
                    options: Options;
                    parent: string | ((this: { name: string; options: Options; storage: Storage; parent: string | ... | undefined; editor?: Editor | undefined; }) => string | undefined) | undefined;
                    storage: Storage;
                },
            ) => undefined
            | string
        )

    The group or space-separated groups to which this node belongs, which can be referred to in the content expressions for the schema.

    By default Tiptap uses the groups 'block' and 'inline' for nodes. You can also use custom groups if you want to group specific nodes together and handle them in your schema.

    group: 'block'
    
    group: 'inline'
    
    group: 'customBlock' // this uses a custom group
    
    inline?:
        | boolean
        | (
            (
                this: {
                    editor?: Editor;
                    name: string;
                    options: Options;
                    parent: boolean | ((this: { name: string; options: Options; storage: Storage; parent: boolean | ... | undefined; editor?: Editor | undefined; }) => boolean | undefined) | undefined;
                    storage: Storage;
                },
            ) => undefined
            | boolean
        )

    Should be set to true for inline nodes. (Implied for text nodes.)

    isolating?:
        | boolean
        | (
            (
                this: {
                    editor?: Editor;
                    name: string;
                    options: Options;
                    parent: boolean | ((this: { name: string; options: Options; storage: Storage; parent: boolean | ... | undefined; editor?: Editor | undefined; }) => boolean | undefined) | undefined;
                    storage: Storage;
                },
            ) => undefined
            | boolean
        )

    When enabled (default is false), the sides of nodes of this type count as boundaries that regular editing operations, like backspacing or lifting, won't cross. An example of a node that should probably have this enabled is a table cell.

    linebreakReplacement?:
        | boolean
        | (
            (
                this: {
                    editor?: Editor;
                    name: string;
                    options: Options;
                    parent: boolean | ((this: { name: string; options: Options; storage: Storage; parent: boolean | ... | undefined; editor?: Editor | undefined; }) => boolean | undefined) | undefined;
                    storage: Storage;
                },
            ) => undefined
            | boolean
        )

    Allows a single node to be set as linebreak equivalent (e.g. hardBreak). When converting between block types that have whitespace set to "pre" and don't support the linebreak node (e.g. codeBlock) and other block types that do support the linebreak node (e.g. paragraphs) - this node will be used as the linebreak instead of stripping the newline.

    See linebreakReplacement.

    marks?:
        | string
        | (
            (
                this: {
                    editor?: Editor;
                    name: string;
                    options: Options;
                    parent: string | ((this: { name: string; options: Options; storage: Storage; parent: string | ... | undefined; editor?: Editor | undefined; }) => string | undefined) | undefined;
                    storage: Storage;
                },
            ) => undefined
            | string
        )

    The marks that are allowed inside of this node. May be a space-separated string referring to mark names or groups, "_" to explicitly allow all marks, or "" to disallow marks. When not given, nodes with inline content default to allowing all marks, other nodes default to not allowing marks.

    marks: 'strong em'
    
    name: string

    The extension name - this must be unique. It will be used to identify the extension.

    'myExtension'
    
    onBeforeCreate?:
        | null
        | (
            (
                this: {
                    editor: Editor;
                    name: string;
                    options: Options;
                    parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: NodeType; parent: ... | null | undefined; }, event: { editor: Editor; }) => void) | null | undefined;
                    storage: Storage;
                    type: NodeType;
                },
                event: { editor: Editor },
            ) => void
        )

    The editor is not ready yet.

    onBlur?:
        | null
        | (
            (
                this: {
                    editor: Editor;
                    name: string;
                    options: Options;
                    parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: NodeType; parent: ... | ... 1 more ... | undefined; }, event: { editor: Editor; event: FocusEvent; transaction: Transaction; }) => void) | null | undefined;
                    storage: Storage;
                    type: NodeType;
                },
                event: { editor: Editor; event: FocusEvent; transaction: Transaction },
            ) => void
        )

    The editor isn’t focused anymore.

    onCreate?:
        | null
        | (
            (
                this: {
                    editor: Editor;
                    name: string;
                    options: Options;
                    parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: NodeType; parent: ... | null | undefined; }, event: { editor: Editor; }) => void) | null | undefined;
                    storage: Storage;
                    type: NodeType;
                },
                event: { editor: Editor },
            ) => void
        )

    The editor is ready.

    onDestroy?:
        | null
        | (
            (
                this: {
                    editor: Editor;
                    name: string;
                    options: Options;
                    parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: NodeType; parent: ... | null | undefined; }, event: void) => void) | null | undefined;
                    storage: Storage;
                    type: NodeType;
                },
                event: void,
            ) => void
        )

    The editor is destroyed.

    onFocus?:
        | null
        | (
            (
                this: {
                    editor: Editor;
                    name: string;
                    options: Options;
                    parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: NodeType; parent: ... | ... 1 more ... | undefined; }, event: { editor: Editor; event: FocusEvent; transaction: Transaction; }) => void) | null | undefined;
                    storage: Storage;
                    type: NodeType;
                },
                event: { editor: Editor; event: FocusEvent; transaction: Transaction },
            ) => void
        )

    The editor is focused.

    onSelectionUpdate?:
        | null
        | (
            (
                this: {
                    editor: Editor;
                    name: string;
                    options: Options;
                    parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: NodeType; parent: ... | ... 1 more ... | undefined; }, event: { editor: Editor; transaction: Transaction; }) => void) | null | undefined;
                    storage: Storage;
                    type: NodeType;
                },
                event: { editor: Editor; transaction: Transaction },
            ) => void
        )

    The selection has changed.

    onTransaction?:
        | null
        | (
            (
                this: {
                    editor: Editor;
                    name: string;
                    options: Options;
                    parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: NodeType; parent: ... | ... 1 more ... | undefined; }, event: { editor: Editor; transaction: Transaction; appendedTransactions: Transaction[]; }) => void) | null | undefined;
                    storage: Storage;
                    type: NodeType;
                },
                event: {
                    appendedTransactions: Transaction[];
                    editor: Editor;
                    transaction: Transaction;
                },
            ) => void
        )

    The editor state has changed.

    onUpdate?:
        | null
        | (
            (
                this: {
                    editor: Editor;
                    name: string;
                    options: Options;
                    parent: ((this: { name: string; options: Options; storage: Storage; editor: Editor; type: NodeType; parent: ... | ... 1 more ... | undefined; }, event: { editor: Editor; transaction: Transaction; appendedTransactions: Transaction[]; }) => void) | null | undefined;
                    storage: Storage;
                    type: NodeType;
                },
                event: {
                    appendedTransactions: Transaction[];
                    editor: Editor;
                    transaction: Transaction;
                },
            ) => void
        )

    The content has changed.

    parseHTML?: (
        this: {
            editor?: Editor;
            name: string;
            options: Options;
            parent: undefined | ((...args: []) => undefined | readonly TagParseRule[]);
            storage: Storage;
        },
    ) => undefined
    | readonly TagParseRule[]

    Associates DOM parser information with this node, which can be used by DOMParser.fromSchema to automatically derive a parser. The node field in the rules is implied (the name of this node will be filled in automatically). If you supply your own parser, you do not need to also specify parsing rules in your schema.

    parseHTML: [{ tag: 'div', attrs: { 'data-id': 'my-block' } }]
    
    priority?: number

    The priority of your extension. The higher, the earlier it will be called and will take precedence over other extensions with a lower priority.

    100
    
    101
    
    renderHTML?:
        | null
        | (
            (
                this: {
                    editor?: Editor;
                    name: string;
                    options: Options;
                    parent: ((this: { name: string; options: Options; storage: Storage; parent: ... | null | undefined; editor?: Editor | undefined; }, props: { node: Node; HTMLAttributes: Record<string, any>; }) => DOMOutputSpec) | null | undefined;
                    storage: Storage;
                },
                props: { HTMLAttributes: Record<string, any>; node: Node },
            ) => DOMOutputSpec
        )

    A description of a DOM structure. Can be either a string, which is interpreted as a text node, a DOM node, which is interpreted as itself, a {dom, contentDOM} object, or an array.

    An array describes a DOM element. The first value in the array should be a string—the name of the DOM element, optionally prefixed by a namespace URL and a space. If the second element is plain object, it is interpreted as a set of attributes for the element. Any elements after that (including the 2nd if it's not an attribute object) are interpreted as children of the DOM elements, and must either be valid DOMOutputSpec values, or the number zero.

    The number zero (pronounced “hole”) is used to indicate the place where a node's child nodes should be inserted. If it occurs in an output spec, it should be the only child element in its parent node.

    toDOM: ['div[data-id="my-block"]', { class: 'my-block' }, 0]
    
    renderText?:
        | null
        | (
            (
                this: {
                    editor?: Editor;
                    name: string;
                    options: Options;
                    parent: ((this: { name: string; options: Options; storage: Storage; parent: ... | null | undefined; editor?: Editor | undefined; }, props: { node: Node; pos: number; parent: Node; index: number; }) => string) | null | undefined;
                    storage: Storage;
                },
                props: { index: number; node: Node; parent: Node; pos: number },
            ) => string
        )

    renders the node as text

    renderText: () => 'foo
    
    selectable?:
        | boolean
        | (
            (
                this: {
                    editor?: Editor;
                    name: string;
                    options: Options;
                    parent: boolean | ((this: { name: string; options: Options; storage: Storage; parent: boolean | ... | undefined; editor?: Editor | undefined; }) => boolean | undefined) | undefined;
                    storage: Storage;
                },
            ) => undefined
            | boolean
        )

    Controls whether nodes of this type can be selected as a node selection. Defaults to true for non-text nodes.

    true
    
    selectable: false
    
    tableRole?:
        | string
        | (
            (
                this: {
                    name: string;
                    options: Options;
                    parent:
                        | undefined
                        | string
                        | (
                            (
                                this: {
                                    name: string;
                                    options: Options;
                                    parent: string | ((this: { name: string; options: Options; storage: any; parent: string | ... | undefined; }) => string) | undefined;
                                    storage: any;
                                },
                            ) => string
                        );
                    storage: Storage;
                },
            ) => string
        )

    A string or function to determine the role of the table.

    'table'
    
    () => 'table'
    
    topNode?: boolean

    Defines if this node should be a top level node (doc)

    false
    
    true
    
    whitespace?:
        | "pre"
        | "normal"
        | (
            (
                this: {
                    editor?: Editor;
                    name: string;
                    options: Options;
                    parent: "pre" | "normal" | ((this: { name: string; options: Options; storage: Storage; parent: "pre" | "normal" | ... | undefined; editor?: Editor | undefined; }) => "pre" | ... 1 more ... | undefined) | undefined;
                    storage: Storage;
                },
            ) => undefined
            | "pre"
            | "normal"
        )

    Controls way whitespace in this a node is parsed. The default is "normal", which causes the DOM parser to collapse whitespace in normal mode, and normalize it (replacing newlines and such with spaces) otherwise. "pre" causes the parser to preserve spaces inside the node. When this option isn't given, but code is true, whitespace will default to "pre". Note that this option doesn't influence the way the node is rendered—that should be handled by toDOM and/or styling.