Skip to content

How can I set a custom figcaption in an attatchment uploded? #1221

Open
@MateoCaicedoW

Description

@MateoCaicedoW

Details

I have been trying to set a custom figcaption in this way

attrs["content"]= `
                            <video data-trix-mutable="true" class="trix-video" width="100%" height="auto" data-trix-store-key="${trixStoreKey}" controls src="${responseData.url}">
                            </video>
                          <figcaption class="attachment__caption">
                              <span class="attachment__name">${attachment.file.name}</span> 
                              <span class="attachment__size">${attachment.getFormattedFilesize()}</span>
                              <a href="${responseData.url}" target="_blank" class="trix-download-link"> Download </a>
                          </figcaption>`

But for some reason when the it renders it keeps the figcaption generated by trix

Image

How can I add content to that figcaption generated by trix?

Activity

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

        Participants

        @MateoCaicedoW

        Issue actions

          How can I set a custom figcaption in an attatchment uploded? · Issue #1221 · basecamp/trix