automatically change height to content of

At the moment, I am working on a website that works with WordPress and Elementor (latest versions). I’m trying to implement an iframe using an html widget in the Elementor editor. The iframe works via an external website link (of a client) and I would like the iframe to automatically adjust in height to the content of the iframe. However, I am currently not getting this to work with the code below. In the Elementor editor itself it looks good, but on the website itself it is barely visible (due to the limited height) and it does not work. I have tried the following codes as well: height=”auto”, height=”100%”, but they didn’t work either.

Does anyone know how I can fix this, please? I did try some solutions on other topics, but these didn’t work either (and I’m not that good at coding). That’s why I created a new topic.

The code used:

<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.2.11/iframeResizer.min.js"></script><script
type="text/javascript">iFrameResize({ inPageLinks: true },
'#externallinkname')</script><iframe id="externallinkname"
src="https:// externallink.com/"
width="100%" scrolling="no"></iframe>

– Note: The names of the following codes are changed, due clients privacy: #externallinkname, id=”externallinkname”, src=”https:// externallink.com/”