diff --git a/docs/templates.md b/docs/templates.md index fcf9ba3b63..81b0151b9d 100644 --- a/docs/templates.md +++ b/docs/templates.md @@ -40,3 +40,5 @@ folders among each other. ### Replacing empty templates Empty template files can be replaced the existing files in `appdata_[instanceid]/richdocuments/empty_templates/`. The files can be reverted to the templates shipped with the release by running the `occ richdocuments:update-empty-templates` command. + +As of Nextcloud 32, empty templates default to document templates based closely on MS Word desktop's current default. In order to regenerate them, you need to run the `occ` command above, which will wipe any custom empty templates you have so be sure to back them up. diff --git a/emptyTemplates/document.ott b/emptyTemplates/document.ott index 176185538c..a0a5677a0a 100644 Binary files a/emptyTemplates/document.ott and b/emptyTemplates/document.ott differ diff --git a/lib/Listener/FileCreatedFromTemplateListener.php b/lib/Listener/FileCreatedFromTemplateListener.php index 746d479bb8..0a347318c8 100644 --- a/lib/Listener/FileCreatedFromTemplateListener.php +++ b/lib/Listener/FileCreatedFromTemplateListener.php @@ -35,7 +35,7 @@ public function handle(Event $event): void { } $targetFile = $event->getTarget(); - if (!in_array($targetFile->getMimetype(), Capabilities::MIMETYPES) && $targetFile->getMimeType() !== 'application/pdf') { + if (!in_array($targetFile->getMimetype(), array_merge(Capabilities::MIMETYPES, Capabilities::MIMETYPES_MSOFFICE)) && $targetFile->getMimeType() !== 'application/pdf') { return; }