Visual editor: handling empty document