http://jsonfiddle.net/a05on Can't save and empty document.