Skip to content

Feature: support for a static register method #5572

@GermanJablo

Description

@GermanJablo

At #4030 @acywatson incorporated an experimental static method called transform. In his words:

The fix I'm proposing here is to introduce a method to nodes that allows them to declare a transform on themselves, rather than registering it through the register API. This allows us to keep this logic encapsulated at the node level, rather than moving it to the plugin, and it should otherwise function the same.

Which has led me to think... Why not do the same with the other registersX functions?

A register method could be used that works just like the mergeRegister function in React.

This could eliminate the need for some plugins tightly tied to a particular node, such as ImagePlugin or TablePlugin. It would also not be necessary to check within the plugin if said node is registered or throw an error if not.

related: #2739

Metadata

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