Plain text editor for all files?

Nextcloud version (eg, 20.0.5): 23.0.0
Operating system and version (eg, Ubuntu 20.04): Linux 4.4.180+ x86_64 (Synology)
Apache or nginx version (eg, Apache 2.4.25): 2.4.51
PHP version (eg, 7.4): 8.0.14

The issue you are facing:

I’d like a simple plaintext editor. I installed and tried Plain text editor 2.14.0 but it would only offer to edit plain text file IFF their extension is .txt. But I’m trying to get a bunch of non-technical friends to share “Playlists” which have to end in .lst. There are other files that are plain text files that end with .pro. Is there any way of teaching Plain text editor and/or NextCloud that I want to associate files that have .lst or .pro files with the Plain text editor?

You can read this issue. In this issue there are a few links. Perhaps the links can help you to change it manually.

1 Like

I eventually configured this for .lst and .pro files. However, this Plain Text Editor also is used with .md files. I want to use Nextcloud Markdown Editor so I installed it but it doesn’t seem like it’s associated with .md file.s. Instead .md files are still opened in Plain Text Editor.

I created 2 files in /var/www/nextcloud/config/

1: mimetypealiases.json
with the contents

	"text/nfo": "text/code",
	"text/srt": "text/code"

2: mimetypemapping.json
with the contents

	"nfo": ["text/plain"],
	"srt": ["text/plain"]

to be able to open them with markdown editor and plain text editor.

just my 2 cents

Didn’t work for me. Remember I’m just trying to get .md files to be editable by the Markdown Editor. I didn’t have a mimetypealiases.json so I created one with:

Jupiter:grep md mimetypemapping.json 
	"cmd": ["application/cmd"],
	"mdown": ["text/markdown"],
	"md": ["text/markdown"],
	"mdb": ["application/msaccess"],
	"mdwn": ["text/markdown"],
Jupiter:cat mimetypealiases.json 
	"text/markdown": "text/code",

Even restarted the docker container, no change in behavior. I can edit but it just uses the Plain Text Editor. If I select the 3 dot menu on I only see Edit in plain… (Note I also tried “text/md”: “text/code” in mimetypesaliases.json.

I just noticed
sudo -u www-data php occ maintenance:mimetype:update-js
but I can’t remember ever using that though you may try if it helps
What if you disable plain text editor

Tried that update-js. Needed to do this via docker as

Jupiter:docker exec -itu 33 nextcloud php occ maintenance:mimetype:update-js
mimetypelist.js is updated

No change.

Disabled plain text editor. Can still edit .md files with the plain text editor! The only difference appears to be that the 3 dot menu no longer has Edit in Plain Text Editor.

Nobody has a solution?