Skip to content

Enable marks inside image caption #551

Closed

Description

@horacioh

Is your feature request related to a problem? Please describe.
Currently the default image block treats caption as a string. this prevents users to add marks or links inside the image caption which might be relevant in some cases.

Describe the solution you'd like
Because the image block is defined an blockContent, it would be interesting to treat the content of an image as inline and store it the same way a paragraph does store content. the only difference is that the image block will have to reserve a place for the image to be set in the document.

Describe alternatives you've considered
I'm not sure if there's an alternative here, but I believe this will make the content of an image caption more richer. also we need to consider this when bringing content from other sources like HTML and Markdown. where the caption of an image might have marks included.

I have an implementation of an image component using the old custom block API that accomplish this.

Activity

  1. elfeffe commented on Jan 22, 2025

    @elfeffe

    Did you find the way?

  2. YousefED commented on Jun 20, 2025

    @YousefED
    Collaborator

    tracking here: #1540

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions