A word processor does that with the Undo button, no extra software required. I think the suggested solution is overkill for the proposed use-case - it introduces potential security problems that are quite disproportionate to the benefit.

On this particular forum, I've never lost a post as you describe, because just clicking 'back' in the browser restores the message. On other forums - yes, I've experienced it, and if I have a feeling it might happen (usually 'cuz I've spent a long time typing and correcting), I'll use the Clipboard for insurance purposes. I think that's really all you need.