editR
editR copied to clipboard
Save on exit
It would be nice if there was a way to save the file you just edited after closing editR. It's common among word processors to warn the user that they are about to close a file with unsaved changes. i don't think that's easy to do with a shiny app, but my suggestion would be an implementation something like this:
- write changes to a temp file as the user is making edits (maybe this is done already for the preview rendering)
- after the
runApp()call exits in theeditR()function, prompt the user to save changes to the file if the temp file and the master file differ.- optionally add arguments to
editR(file, saveOnExit)where save on exit would be a boolean that forces a behavior and skips the user prompt.
- optionally add arguments to
@restonslacker This would be a nice addition indeed. I am swamped with work at the moment, but I'll get to it as soon as I can free up some time.
totally understood. I am too (and a new baby), otherwise i would have sent a PR.