My guess is it is something to do with your company’s setup. Could be the PC build, the way OneDrive has been configured, the internet firewall/proxy connection.
Sorry I can’t be of more help but it looks like you may be stuck with having to work around it by copying from OneDrive to your local hard-drive (e.g. desktop), edit using Notepad++ there, then copy back to OneDrive.