Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add mimetype to creators
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Dec 2, 2019
commit 9d645c80108a79d15dd3ef276b9e0d9f154f00fd
4 changes: 4 additions & 0 deletions lib/DirectEditing/TextDocumentCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ public function getExtension(): string {
return '.md';
}

public function getMimetype(): string {
return 'text/markdown';
}

public function create(File $file, string $creatorId = null, string $templateId = null): void {
parent::create($file, $creatorId, $templateId); // TODO: Change the autogenerated stub

Expand Down
4 changes: 4 additions & 0 deletions lib/DirectEditing/TextDocumentTemplateCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ public function getTemplates(): array {
return self::TEMPLATES;
}

public function getMimetype(): string {
return 'text/markdown';
}

public function create(File $file, string $creatorId = null, string $templateId = null): void {
$template = self::TEMPLATES[$templateId];
$file->putContent('## ' . $template['name'] . '\n\n' . 'Created from a template with Nextcloud text');
Expand Down