Closed winter60 closed 1 month ago
thanks, I tried, video
works, but iframe
does not.
iframe is blocked and our frame-src
CSP is https://viewer.diagrams.net https://www.draw.io https://*.google.com;
for security reasons. You'd have to host your own instance with the following DOM_PURIFY_CONFIG
:
window.DOM_PURIFY_CONFIG = window.DOM_PURIFY_CONFIG ||
{ADD_TAGS: ['use', 'foreignObject'], FORBID_TAGS: ['form'],
ALLOWED_URI_REGEXP: /^((?!javascript:).)*$/i,
ADD_TAGS: ['iframe'],
ADD_ATTR: ['target', 'content', 'pointer-events',
'requiredFeatures']};
<iframe width="560" height="315" src="https://www.youtube.com/embed/xxxxxxxxxxxx" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
How to embed youtube in drawio?