How can I embed a youtube video with markdown? #4580
Replies: 6 comments 26 replies
-
Beta Was this translation helpful? Give feedback.
-
Do you have similar advice to embed video from Google Drive ? |
Beta Was this translation helpful? Give feedback.
-
I am unable to get this to work for some reason on my server. All youtube embeds just don't show up. I put your code not only in the HTML inject but in the seperate page as well to see. Nada. Any help would be much appreciated! |
Beta Was this translation helpful? Give feedback.
-
please delete |
Beta Was this translation helpful? Give feedback.
-
There's a much easier way to do this Add the following to where you want the iframe to load on the page, wiki js will give it an id of
Then click on page, click on scripts, here you can define the page script for each page <script>
window.onload = function() {
document.getElementById('youtube-video').outerHTML = '<iframe width="100%" height="550" src="https://www.youtube.com/embed/Q-0T3uA225Y?si=golv8OHBelfG_mXq" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>';
};
</script> Add this code into the script. Replace the URL with your youtube's URL |
Beta Was this translation helpful? Give feedback.
-
Версия кода для работы с RuTube: Переопределение CSS (Без изменений):
А вот внедрение в HTML:
|
Beta Was this translation helpful? Give feedback.
-
Anybody can help me how I can embed a youtube video with markdown in wiki.js?
Thanks!
Marc
Beta Was this translation helpful? Give feedback.
All reactions