Hide <>Embed button with Iframe

castelmager's picture
Forums: 

Hi, I'm using h5p content by adding the Iframe generated in H5p, but the thing is that I want to hide the <>Embed button ,but to get the Iframe url , when I create the activity need to set the button to visible. 

I tried to hide it by css : 

.h5p-content ul.h5p-actions {

   display: none !important;

}

But is not working .... Any clue ?

 

Thanks!

Sebastian.

icc's picture

You should be able to disable the embed button from the H5P settings page.
If you are in WordPress this will break the embed code, however, you can add the following to wp-config.php for overriding it:

define('H5P_EMBED_URL_ALWAYS_AVAILABLE', true);

I'm afraid it's not possible to only hide the embed button for the embedded view.

Let me know if this solves your need.

castelmager's picture

Hi, thaks for reply.

"You should be able to disable the embed button from the H5P settings page."  The thing is if I disable it by config, the I cannot get the embed url.

I'm on moodle. But for moodle is not posible to get the embed code, so I'm generating the content here in h5p.org. By the way, exist a limit of content that I can create in your servers ? Cause I'm working with the Iframe, and from moodle pluging there is not way to get the embed code :/

icc's picture

Ah, I see. I think you can create the content, copy/use the embed code and then edit the content and turn off the embed.

Currently, there is no limit to how much you can create. So, feel free to create as much as you like :-)

castelmager's picture

I'll try but I'm afraid that a new id will be generated ... 

Do you know if this option will be available for moodle plugin ? Cause is better for my to create and manage my own content :)

 

 

icc's picture

No need to worry, the ID is only set the first time content is created. It will stay the same no matter how many times the content is changed or updated.

I agree you have more control over the content if you host it yourself. Unfortenly this isn't possible in Moodle due to different challenges, however, many have requested this feature so I believe it will come sooner rather than later.

One good practice I always exercise when I create or modify content is to download the .h5p file after saving. This way I know that I always have a local copy of the content if I should ever need it.

castelmager's picture

Great! 

Yes, I'm saving it , just in case. Other workaround that works is have a wordpress running with the h5p plugin, and there manage the content to provide moodle :)

Thanks!