Skip to content

Feature request: expand on label builder #11205

@Janther

Description

@Janther

With version 2.3.0 the builder label was introduced.
This has helped a lot for doc analysis and making printing choices in our plugin. But the signature says that label should be a string and we are using JSON.stringify() and JSON.parse() to pass additional data.

It would be great if the label specification could also expand to support metadata or have a dedicated metadata builder that behaves the same as label but receives an object.

Expected behavior:

I could call label like

label({ label: 'foo', ...additionalData }, doc);
// or
metadata(additionalData, doc);

Actual behavior:

I'm only capable to call

label('foo', doc);

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions