Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

342
Visualizações
angular innerHTML set Instagram embed width, height and show captioned

I've tried adjusting the width and height and showing captioned of the ig embed, but neither seems to work.

This example has been used as a reference.

This case doesn't make any changes, but it fits the width of the viewport. But when I use it, no matter how I modify the window, it is displayed as a small width, and it cannot be displayed as a captioned.

enter image description here

width and height:

<blockquote class="instagram-media" data-instgrm-permalink="https://www.instagram.com/p/CGSnZSIHaiu/?utm_source=ig_embed&utm_campaign=loading" data-instgrm-version="14" style=" background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; min-width:326px; <<=======

I tried to modify the max-width and min-width..etc inside the blockquote, but it didn't work.

showing captioned

<blockquote class="instagram-media" data-instgrm-captioned <=======here data-instgrm-permalink="https://w....

Adding data-instgrm-captioned to the properties, it shows the captioned, but it didn't work in my case.


This embed needs to be added (<any>window).instgrm.Embeds.process(); to display successfully. I wonder if it has anything to do with the timing of the operation?


UPDATE:

I found out that the problem is with innerHTML (angular).

<div class="ig-container">
    <div [innerHTML]="html">
    </div>
</div>

If this is the case, ig will naturally extend:

<div class="ig-container"> <blockquote class="instagram-media" data-instgrm-captioned data-instgrm-permalink="https://w.... </div>

I tried to set css to auto-extend without success:

<div class="ig-box" [innerHTML]="html">
    </div>

.ig-box {
  width: 1000px;
}
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda