Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MateoCaicedoW opened this issue Jan 17, 2025 · 0 comments
Open

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

MateoCaicedoW opened this issue Jan 17, 2025 · 0 comments

Comments

@MateoCaicedoW
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant