Skip to content

Commit e608106

Browse files
committed
feat: Add setting for rich mode and make markdown the default
Signed-off-by: Julius Härtl <[email protected]>
1 parent cec5105 commit e608106

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/Service/SettingsService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class SettingsService {
1818
/* Allowed attributes */
1919
private array $attrs;
2020

21-
private $defaultSuffixes = [ '.txt', '.md' ];
21+
private $defaultSuffixes = [ '.md', '.txt' ];
2222

2323
public function __construct(
2424
IConfig $config,
@@ -48,7 +48,7 @@ public function __construct(
4848
return implode(DIRECTORY_SEPARATOR, $path);
4949
},
5050
],
51-
'noteMode' => $this->getListAttrs('noteMode', ['edit', 'preview']),
51+
'noteMode' => $this->getListAttrs('noteMode', ['rich', 'edit', 'preview']),
5252
'customSuffix' => [
5353
'default' => $this->defaultSuffixes[0],
5454
'validate' => function ($value) {

src/components/AppSettings.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,12 @@ export default {
6363
data() {
6464
return {
6565
extensions: [
66-
{ value: '.txt', label: '.txt' },
6766
{ value: '.md', label: '.md' },
67+
{ value: '.txt', label: '.txt' },
6868
{ value: 'custom', label: t('notes', 'User defined') },
6969
],
7070
noteModes: [
71+
{ value: 'rich', label: t('notes', 'Open in rich text mode') },
7172
{ value: 'edit', label: t('notes', 'Open in edit mode') },
7273
{ value: 'preview', label: t('notes', 'Open in preview mode') },
7374
],

0 commit comments

Comments
 (0)