A simple script (js of course) is needed to check when the user is offline and when he's editing a page.
Just for test purpose you think about a function fired from those the offline event (and the condition of editing mode) that simply puts an alert.