Added insertion support to be able to edit from empty document.