hey All, do you know if itโs possible to embed a video within the docs generated with Dokka?
i
Ignat Beresnev
01/13/2023, 1:39 PM
Hi! I don't think it's possible to do out of the box as Markdown doesn't seem to support it
You could do it with a Dokka plugin though ๐ Maybe through a custom kdoc tag, like
@video <http://youtube.com/etc>
, which would embed the video into the HTML
t
tomekj
01/13/2023, 1:39 PM
thanks for the tip, I will investigate that approach ๐
v
Vadim Mishenev
01/13/2023, 3:44 PM
Anyway, you can insert HTML code into KDoc directly. But it will work only in a browser. Something like
Copy code
/**
* <iframe width="560" height="315" src="<https://www.youtube.com/embed/fFptQ9QBcvo>" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
*
* Some text
*/