Almost perfect! The only thing missing (for me) is the ability to edit in one part of the document at the same time as someone else edits a different part of the document, (similar to how firepad.io works).
With that addition it would be just wonderful!
Any chance you'll be adding this source code to GitHub?