Nope, that’s dangerous since you can execute abitrary code from these pages. You absolutely should not use Nextcloud as a web hosting platform because not only is it unsafe but also terribly slow.
i would love to be able to edit these files in nextcloud as well, can this be done?
There is an editor app GitHub - nextcloud/files_texteditor: 📄 Text editor for plaintext files which is probably included in your download.