Hi, thanks.
It's only saved as a lua string in an in-game global variable, which gets serialized into factorio savegame file.
But you can totally edit code in normal editor, just need to then copy-paste it into appropriate combinator in-game.
I've always edited such code in emacs here, which of course is more convenient than a simple text box.
I think factorio mod API allows write_file() function, intended for saving logs, reports or debug outputs, but not loading files back.
There is also RCON interface for talking to lua in dedicated servers from an external app, and that can be used to have a trivial external script running, which monitors a directory of files somewhere and synchronizes code to/from with the game combinators.
RCON-based tool might be a nice and not that difficult thing to implement, but dunno if I'll get to it tbh.