Skip to content

Feature: Document the withKlass option for node replacement #6398

Open
@etrepum

Description

Description

When using node replacement, it's often useful to specify the withKlass option so that any behaviors that were intended for the original node type should work with the replaced node type (e.g. node transforms, mutation listeners, etc.).

Impact

Anyone replacing built-in nodes with extended versions should probably be using this, but they wouldn't know that it's even an option unless they were looking at the types or the source code. Even then, it would be tricky to know what the semantics are unless you have a pretty thorough understanding of how the editor is constructed and how listeners work.

It may even be worth a lint and/or a warning when this is not specified.

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement over existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions