mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 17:46:28 +08:00
onlyoffice: support pdf documents
This commit is contained in:
6 files changed
+38
-24
No files matched your search
@@ -35,9 +35,9 @@ const loader = (mode) => async (element) => {
|
||||
const getEles = (types: string[]) => types.flatMap((type) => $(`div[data-${type}]`).get());
|
||||
|
||||
addPage(new AutoloadPage('onlyoffice', async () => {
|
||||
const all = getEles(['doc', 'docx', 'cell', 'xls', 'xlsx', 'slide', 'ppt', 'pptx']);
|
||||
const all = getEles(['doc', 'docx', 'cell', 'xls', 'xlsx', 'slide', 'ppt', 'pptx', 'pdf']);
|
||||
if (all.length) await load();
|
||||
getEles(['doc', 'docx']).forEach(loader('word'));
|
||||
getEles(['doc', 'docx', 'pdf']).forEach(loader('word'));
|
||||
getEles(['cell', 'xls', 'xlsx']).forEach(loader('cell'));
|
||||
getEles(['slide', 'ppt', 'pptx']).forEach(loader('slide'));
|
||||
}));
|
||||
Reference in new issue
Block a user