modifying css styles in h5p content

Re: modifying css styles in h5p content

by Dominique Palumbo -
Number of replies: 0
Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi,

you can maybe use javascript that will be apply after the page creation.
You can use jquery to find more easily the iframe element specialy that you probably doesn't know the complete id...

var iframe = document.getElementById('h5p-iframe-862');
var style = document.createElement('style');
style.textContent =
'body {' +
' border: 10px solid red;' +
'}'
;
iframe.contentDocument.head.appendChild(style);

It's inspired by the code from there : https://ask.xiaolee.net/questions/1065204

Hope it's help.

Dominique.