I find the Markor app (open source) great for editing text files, you can also customize it quite a bit. Then for uploading possibly syncthing would work.
(I do this to sync my text files between my PC and phone, works great)
(I do this to sync my text files between my PC and phone, works great)