# Como adicionar iframe à lista de permissões do Kotlin playground?

**URL:** <https://meta.discourse.org/t/how-to-whitelist-iframe-from-kotlin-playground/223885>\
**Category:** Support\
**Created:** [Abril 11, 2022, 6:58am UTC](https://meta.discourse.org/t/how-to-whitelist-iframe-from-kotlin-playground/223885 "2022-04-11T06:58:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheBestPessimist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thebestpessimist/32/247704_2.png) [@TheBestPessimist](https://meta.discourse.org/u/TheBestPessimist)\
**Post date:** [Abril 11, 2022, 6:58am UTC](https://meta.discourse.org/t/how-to-whitelist-iframe-from-kotlin-playground/223885/1 "2022-04-11T06:58:39Z")

</div>

Este é o que eu quero incorporar: [Kotlin Playground: Edit, Run, Share Kotlin Code Online](https://play.kotlinlang.org/#eyJ2ZXJzaW9uIjoiMS42LjIwIiwiY29kZSI6ImltcG9ydCBqYXZhLnRpbWUuRGF5T2ZXZWVrXG5pbXBvcnQgamF2YS50aW1lLkxvY2FsRGF0ZVxuaW1wb3J0IGphdmEudGltZS5mb3JtYXQuRGF0ZVRpbWVGb3JtYXR0ZXJcblxucHJpdmF0ZSB2YWwgZGF0ZUZvcm1hdHRlciA9IERhdGVUaW1lRm9ybWF0dGVyLm9mUGF0dGVybihcInV1dXUtTU0tZGQsIEVFRUVcIilcbnByaXZhdGUgdmFsIHdlZWtlbmQgPSBsaXN0T2YoRGF5T2ZXZWVrLlNBVFVSREFZLCBEYXlPZldlZWsuU1VOREFZKVxuXG5cbnByaXZhdGUgY29uc3QgdmFsIERBWV9JTl9NT05USCA9IFwiMjAyMi0wNC0wMVwiXG5cblxuZnVuIG1haW4oKSB7XG4gICAgdmFsIHJhbmRvbURheUluTW9udGggPSBMb2NhbERhdGUucGFyc2UoREFZX0lOX01PTlRIKVxuICAgIGRheXNMaXN0KHJhbmRvbURheUluTW9udGgpXG59XG5cbmZ1biBkYXlzTGlzdChyYW5kb21EYXlJbk1vbnRoOiBMb2NhbERhdGUpIHtcbiAgICB2YWwgc3RhcnQgPSByYW5kb21EYXlJbk1vbnRoLndpdGhEYXlPZk1vbnRoKDEpXG4gICAgdmFsIGVuZCA9IHN0YXJ0LnBsdXNNb250aHMoMSlcblxuICAgIHZhciBudW1iZXJPZldvcmtlZERheXMgPSAwXG5cbiAgICBzdGFydC5kYXRlc1VudGlsKGVuZCkuZm9yRWFjaCB7XG4gICAgICAgIGlmIChpdC5kYXlPZldlZWsgaW4gd2Vla2VuZCkge1xuICAgICAgICAgICAgcHJpbnRsbigpXG4gICAgICAgICAgICByZXR1cm5AZm9yRWFjaFxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIGRhdGVGb3JtYXR0ZWQgPSBpdC5mb3JtYXQoZGF0ZUZvcm1hdHRlcikucGFkRW5kKDIxLCAnICcpXG5cbiAgICAgICAgcHJpbnRsbihcIiRkYXRlRm9ybWF0dGVkICA4IGhvdXJzXCIpXG4gICAgICAgIG51bWJlck9mV29ya2VkRGF5cysrXG4gICAgfVxuXG4gICAgcHJpbnRsbihcbiAgICAgICAgXCJcIlwiXG5cblxuICAgICAgICBUb3RhbCB3b3JrZWQgZGF5czogJG51bWJlck9mV29ya2VkRGF5c1xuICAgICAgICBUb3RhbCB3b3JrZWQgaG91cnM6ICR7bnVtYmVyT2ZXb3JrZWREYXlzICogOH1cbiAgICAgICAgXCJcIlwiLnRyaW1JbmRlbnQoKVxuICAgIClcbn1cbiIsInBsYXRmb3JtIjoiamF2YSIsImFyZ3MiOiIifQ==)

Este é o URL do iframe: `\u003ciframe src=\"https://pl.kotl.in/xrwqnYnxC?theme=darcula\"\u003e\u003c/iframe\u003e`

O mesmo URL do iframe apenas para ver se a incorporação funciona nos metadados:  
\u003ciframe src="[Kotlin Playground: Edit, Run, Share Kotlin Code Online](https://pl.kotl.in/xrwqnYnxC?theme=darcula%5C)"\u003e\u003c/iframe\u003e

E é para onde o URL acima me redireciona: `https://play.kotlinlang.org/embed?short=xrwqnYnxC\u0026theme=darcula`

É isso que tentei adicionar, mas não parece funcionar:

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/9/3/293a5f0c6c96cc13cc83f623a444b107d9f9c8a2.png)

Tentei adicionar um ou outro dos 2 links do kotlin. Também tentei adicionar ambos.

---

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [Abril 12, 2022, 12:45am UTC](https://meta.discourse.org/t/how-to-whitelist-iframe-from-kotlin-playground/223885/2 "2022-04-12T00:45:54Z")

</div>

hmm estranho, eu consigo fazer funcionar na minha instância de desenvolvimento

 ![Screen Shot 2022-04-11 at 8.43.14 PM](https://global.discourse-cdn.com/meta/original/4X/9/c/a/9ca498b4c7314418481fcd6d0761c638fc2e4e75.png)

 ![Screen Shot 2022-04-11 at 8.42.35 PM](https://global.discourse-cdn.com/meta/original/4X/1/d/0/1d081d6c9cf18cc793eb1521892fc70549163405.png)

há algum erro no console quando você tenta visualizar o tópico com o iframe?

---

<div class="post-metadata">

**Author:** ![TheBestPessimist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thebestpessimist/32/247704_2.png) [@TheBestPessimist](https://meta.discourse.org/u/TheBestPessimist)\
**Post date:** [Abril 12, 2022, 4:26am UTC](https://meta.discourse.org/t/how-to-whitelist-iframe-from-kotlin-playground/223885/3 "2022-04-12T04:26:08Z")

</div>

parece que está funcionando hoje

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/a/e/cae0334a75fb172895c75af8a6075c9e118df194.png)

então não sei o que pode ter acontecido.

Segunda pergunta: existe uma maneira de deixar essa caixa mais bonita? é algo do iframe, ou algo do discourse?
