mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: richmedia: add msoffice support
This commit is contained in:
1 parent
4fab4dc275
commit
3789a4fd6c
2 files changed
+7
-1
No files matched your search
@@ -124,6 +124,12 @@ export function Media(md: MarkdownIt) {
|
||||
scrolling="no" border="0" frameborder="no" framespacing="0" width="100%" style="min-height:500px" ${allowFullScreen}></iframe>
|
||||
`;
|
||||
}
|
||||
if (service === 'msoffice') {
|
||||
return `\
|
||||
<iframe src="https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(src)}"
|
||||
scrolling="no" border="0" frameborder="no" framespacing="0" width="100%" style="min-height:500px" ${allowFullScreen}></iframe>
|
||||
`;
|
||||
}
|
||||
if (service === 'pdf') {
|
||||
if (src.startsWith('file://')) src += src.includes('?') ? '&noDisposition=1' : '?noDisposition=1';
|
||||
return `\
|
||||
|
||||
Reference in new issue
Block a user