Editor with Trailing node

Experiment

Experiment, currently not supported or maintained. This extension does not have a published package yet. You may need to copy the source code and create your own extension.

The Trailing Node extension automatically appends an invisible node at the end of the document. This is useful for purposes like adding a consistent footer or signature.

In the example shown here, the trailing node is left empty to enable you to place your caret behind the code block.

Since this extension is not yet published officially, you may need to copy the source code and create your own extension.

Configure behavior

In this example, when text is entered in the last node, the system does not automatically create a new trailing node. This behavior is configurable. The relevant configuration can be implemented within the addOptions() method as follows:

addOptions() {
    return {
        node: 'paragraph',
        notAfter: ['paragraph'],
    };
}

Notes

  • Not published: This extension does not have a published package yet. You may need to copy the source code and create your own extension.
  • Experiment: This extension is an experiment and not yet supported or maintained.
  • This is currently using an actual node - would be better to use a decoration in the future so the document is not changed