Skip to content

Can I set the default "center" alignment for image captions? #1098

Open
@lamtuanamc

Description

@lamtuanamc

When inserting an image block, I want to set the caption text alignment to "center" by default.

In the previous version of BlockNote (0.14.x), I was able to do this with the following code:

defaultBlockSpecs.image.config.propSchema.textAlignment = {
  default: 'center',
  values: ['left', 'center', 'right', 'justify'],
};

However, in newest version, I can't seem to set it this way anymore, as the default value is now 'left', and it's no longer a string type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions