Implemented a copy document command, which clones a document from one
window to another.