I'm wanting to put an iframe into a sidebar of drupal 8 . I installed the iframe module, and enabled.
Added new content > Iframe field . Enter the url for supersaas my schedule so something along line of http://supersaas.com/schedule/name/schedulename and a width and height for iframe, save and publish.

Block layout >region >right sidebar > configure > place block > select entity view (content) and select content type as 'iframe' and view mod as 'full content' save and publish however all as I get is a empty iframe box with nothing within it. Tried also just using a you tube video url and had the same result.

Could someone advise what I have done wrong and what I should be doing ?

Comments

pixelsweatshop’s picture

Why are you using an iframe module, content type and views. Just copy/paste your iframe code into a block and place it.

craka’s picture

Hi Nicoz,

I'm unsure why, a happen to come across that module and thought it would be required. Since I saw your post I tried just copying the iframe code into a block and placing it however again I just get an empty iframe box.

pixelsweatshop’s picture

Make sure to set the text format below the block body field to full html. Also make sure to paste your code with the the source button on the ckeditor enabled.

craka’s picture

Hmm, I thought that too, and thought I had doubled checked that. It appears I had not, as it works if I embed a youtube video, however it does not for the supersaas schedule.
Thinking it must be user access related to supersaas?

pixelsweatshop’s picture

Thinking it must be user access related to supersaas?

Don't know what the issue is, but if you can embed a youtube video, you should be able to embed any other iframe.

According to https://www.supersaas.com/tutorials/integrate_with_your_site it is pretty straight forward.

craka’s picture

Me too. The plots thickens, I've tried several other website to place in the iframe however none work, I have only managed to be successful with the youtube embedded code <iframe width="854" height="480" src="https://www.youtube.com/embed/K8fUcB4fGeE" frameborder="0" allowfullscreen></iframe>

Ive simply replaced the source url with others and it is not working. I than thought I'd try just the plain url of the youtube video and that did work within the above iframe code replaced with https://youtu.be/K8fUcB4fGeE and it doesn't work either.

I'm nor savy at this but I'm stumped. What is my problem?

craka’s picture

I've checked I have full html and using source when entering html code. However for instance if I use this code <iframe src='http://www.supersaas.com/schedule/name/schedulename/' style='border:0'></iframe>
when I save and view the source code it is converted to
<p><iframe src="http://www.supersaas.com/schedule/name/schedulename/" style="border:0"></iframe></p>
would that stop it working?

pixelsweatshop’s picture

I just copied and pasted your iframe code into a vanilla install of drupal 8 and it works fine. So something is wrong with your setup.

Try inspecting the css to see if something is overriding it.
Try changing browsers as see if it persists.
Change default theme
Add a width and a height to the iframe

craka’s picture

Hmm ok, I'm guessing at this stage that it's either related to the 'lightning' extension or the bootstrap mint theme.