CasaOS icon indicating copy to clipboard operation
CasaOS copied to clipboard

Expand support of files for text editor

Open Dysta opened this issue 2 years ago • 6 comments

Is your feature request related to an issue? Please describe. Currently, a few file extensions open a text editor in the web view. Some common extensions like .toml, .cfg are not supported and ask to be downloaded if we click on them

Describe the solution you want When clicking on a .toml or .cfg, it opens a text editor like a .json file

Describe the alternatives you considered A workaround is to add the .txt extension to the file, then open it, do what we need, save it, and remove the .txt extension.

Additional context Currently unsupported extension that are common to edit:

  • .cfg
  • .toml
  • .properties
  • .env

I will update this list if I find more extension

Dysta avatar Jan 02 '24 11:01 Dysta

Understand your needs, I have recorded it

ETWang1991 avatar Jan 05 '24 01:01 ETWang1991

I'll add support for .toml combined .cfg file editing in the next update, and in the meantime you can help list more file types.

jerrykuku avatar Jan 08 '24 05:01 jerrykuku

I took the liberty of writing a little list.

.conf .config .toml .ini .json .yaml .yml .xml .rc .env .service .conf.d .sh .htaccess .cfg .gitconfig .vim .curlrc .wgetrc .gitignore .editorconfig .hgrc .properties .jshintrc .txt .md .log .html .css .php .js .bat .r .pl .rb .c .cpp .java .src .py .h .tex .rtf .eps .svg .jsonld .ttl .n3 .rss .atom .yarnrc .gitattributes .srt .tsv .vcard .ics .plaintext .asc .sql .url .csv .diff

config <-- file named config

henrikhjelmse avatar Jan 12 '24 08:01 henrikhjelmse

Ok I will update them.

jerrykuku avatar Jan 22 '24 08:01 jerrykuku

i belive it is better to check metadata if it is a textfile or not.

henrikhjelmse avatar Jan 22 '24 08:01 henrikhjelmse

something that would be scalable is in the dot (…) menu to “Open as…” “text file” or something along these lines…

udance4ever avatar Apr 26 '24 21:04 udance4ever