Skip to content

Commit 14a8a41

Browse files
authored
Merge pull request #4964 from nextcloud/feat/updated-blank-templates
New blank document template to improve user acceptance
2 parents e839f00 + a2ead08 commit 14a8a41

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

docs/templates.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ folders among each other.
4040
### Replacing empty templates
4141

4242
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.
43+
44+
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.

emptyTemplates/document.ott

10.3 KB
Binary file not shown.

lib/Listener/FileCreatedFromTemplateListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function handle(Event $event): void {
3535
}
3636

3737
$targetFile = $event->getTarget();
38-
if (!in_array($targetFile->getMimetype(), Capabilities::MIMETYPES) && $targetFile->getMimeType() !== 'application/pdf') {
38+
if (!in_array($targetFile->getMimetype(), array_merge(Capabilities::MIMETYPES, Capabilities::MIMETYPES_MSOFFICE)) && $targetFile->getMimeType() !== 'application/pdf') {
3939
return;
4040
}
4141

0 commit comments

Comments
 (0)