Skip to content

Commit

Permalink
feat: Add setting for rich mode and make markdown the default
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Feb 24, 2023
1 parent 997b8a4 commit 7fa3868
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Service/SettingsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class SettingsService {
/* Allowed attributes */
private array $attrs;

private $defaultSuffixes = [ '.txt', '.md' ];
private $defaultSuffixes = [ '.md', '.txt' ];

public function __construct(
IConfig $config,
Expand Down Expand Up @@ -48,7 +48,7 @@ public function __construct(
return implode(DIRECTORY_SEPARATOR, $path);
},
],
'noteMode' => $this->getListAttrs('noteMode', ['edit', 'preview']),
'noteMode' => $this->getListAttrs('noteMode', ['rich', 'edit', 'preview']),
'customSuffix' => [
'default' => $this->defaultSuffixes[0],
'validate' => function ($value) {
Expand Down
3 changes: 2 additions & 1 deletion src/components/AppSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ export default {
data() {
return {
extensions: [
{ value: '.txt', label: '.txt' },
{ value: '.md', label: '.md' },
{ value: '.txt', label: '.txt' },
{ value: 'custom', label: t('notes', 'User defined') },
],
noteModes: [
{ value: 'rich', label: t('notes', 'Open in rich text mode') },
{ value: 'edit', label: t('notes', 'Open in edit mode') },
{ value: 'preview', label: t('notes', 'Open in preview mode') },
],
Expand Down

0 comments on commit 7fa3868

Please sign in to comment.