make it possible to configure supported filenames for rich workspace
Is your feature request related to a problem? Please describe. the rich workspace feature is awesome, but the list of filename patterns that trigger it is:
- hardcoded in https://github.com/nextcloud/text/blob/62ecb11de6b59bf5f74d6a59b5173a626f8084f2/src/views/RichWorkspace.vue#L54
- english-minded
we use nextcloud in a french context, with no-so-savvy users, and so far provide them readonly shares with a _LISEZMOI.md file (LISEZMOI=README in french) because they:
- understand they have to read it
- and it's the first file in the share, because it starts with an underscore
we were previously using files_markdown/files_texteditor so that they had the markdown rendered when clicking on the files. Since we're switching to the text app, i'm planning to enable the awesome rich workspace feature, because that way the markdown would be displayed straight away when landing in the share. .. but the name doesn't match the patterns, and the patterns are hardcoded.
Describe the solution you'd like
it would be great to be able to override the default list via an occ app:config toggle
Describe alternatives you've considered
mass-renaming all _LISEZMOI.md files, which could lead to user confusion since we've explained them that this file was supposed to be here. and they might not understand README.md either.
after looking at the code thinking how hard would it be ?, i've now spotted https://github.com/nextcloud/text/blob/main/lib/Service/WorkspaceService.php#L40 which, via https://github.com/nextcloud/text/blob/main/l10n/fr.js#L20 allows a file named Lisez moi.md to be automatically rendered in the rich workspace.
That will probably suit my usecase, but having it configurable could be a nice addition.. adding the config value to self::SUPPORTED_STATIC_FILENAMES ?