Is there a way to edit .php, .py, or .html files in NC (v18). If I try to access any of these filetypes on local or external storage, the file is never displayed (actually, once or twice I was able to see and edit a .html file but it is not every time).
I used this topic to add custom mappings for .srt and .nfo. I guess you try the same but for different extentions.
hope this is of any help,
I thought the mimetype mapping was used to associate a file icon with a given suffix. The filetypes that I wish to be able to edit include .html, .php, and .py. The icons displayed by NC look correct,; however, when I try to open them the wheel just spins. Any file that is viewed as code is not opening.
I get the same issue in 18.0.3. It works in 17 and 19. Weird I can create a .js file in Chrome and then edit the created one in Firefox but I can’t create a new one. Neither in Chrome nor Firefox can I create a .php file.
I would recommend opening an issue in GitHub. Be sure to post browser you are using plus any errors in the dev tools console.
As a temporary resolution the only thing I can advise is disable and install the old text editor app - following same instructions here: Issue with "Text" App under Internet Explorer 11
I installed and enabled the old “Plain Text Editor v2.11” app (had to change the min version to 18 from 19). I then disabled the Text app v2.0.0. I also have the markdown Editor v.2.2.0 enabled. Now when I open one of these “code” files, I am getting the browser prompt asking what app to use (i.e. NC is not handling the file). So with the new Text app, I get a wheel when trying to open code files and with the old Plain Text Editor, I get files being handed to the browser to open with a client app. Isn’t there a way to open these files in an editor?
Another piece of information…the IOS app displays these files although they cannot be edited in NC. However, they can be opened in an app on IOS (e.g, Koder). This is with Plain text Editor disabled, Text and Markdown enabled.
To confirm I tried that version and it doesn’t work for me on v18. This issue usually indicates something to do with mime types support of the app or a mimetypemapping issue on the server. It seems to have to do with v2.11 & v18 but I didn’t investigate further as these exact instructions exactly worked for me: https://github.com/icewind1991/files_markdown/issues/135#issuecomment-541340681
However you can replace 17.0.0 w 18.0.2, I tried and it will work (17 is Text Editor v2.9 while 18 is v2.10). Either seems fine, just don’t use v2.11.