Doc: Make \youtube macro work with litehtml help backend
Unlike the QTextBrowser backend, litehtml does not render elements inside <iframe> correctly. This prevented external links to YouTube from working in offline documentation. Move the <iframe> to a macro override specific to online doc builds. Fixes: QTBUG-88975 Change-Id: Iff7828ddeed353620eaa9ac669a3e0c03749daa2 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit ca8e9ff2ef0a01248e3bdd718ef9fc06419214a4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
1e4c56463f
commit
b16f9068c2
4
doc/global/macros-online.qdocconf
Normal file
4
doc/global/macros-online.qdocconf
Normal file
@ -0,0 +1,4 @@
|
||||
macro.youtube.HTML = "<div class=\"video\">\n<span class=\"vspan\"></span>\n" \
|
||||
"<iframe src=\"https://www.youtube.com/embed/\1\"" \
|
||||
"frameborder=\"0\" allowfullscreen>\n" \
|
||||
"</iframe></div>\n"
|
@ -57,12 +57,10 @@ macro.QtMinorVersion.match = "\\d+\\.(\\d+)"
|
||||
# qhp.ProjectName.extraFiles += images/dQw4w9WgXcQ.jpg
|
||||
#
|
||||
macro.youtube.HTML = "<div class=\"video\">\n<span class=\"vspan\"></span>\n" \
|
||||
"<iframe src=\"https://www.youtube.com/embed/\1\"" \
|
||||
"frameborder=\"0\" allowfullscreen>\n" \
|
||||
"<a href=\"https://www.youtube.com/watch/?v=\1\">\n"\
|
||||
"<img src=\"images/\1.jpg\"" \
|
||||
"title=\"Click to play in a browser\" /></a>\n" \
|
||||
"</iframe></div>\n"
|
||||
"</div>\n"
|
||||
|
||||
macro.excludefromcreator = "\\meta tag broken"
|
||||
|
||||
|
@ -23,6 +23,9 @@ include(manifest-meta.qdocconf)
|
||||
include(fileextensions.qdocconf)
|
||||
include(qt-html-templates-online.qdocconf)
|
||||
|
||||
#override macros for online use
|
||||
include(macros-online.qdocconf)
|
||||
|
||||
#extra configuration data DITA information
|
||||
include(config.qdocconf)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user